|
I have an application developed using Visual Studio 2005 and VB.Net which displays data from an Access database. I can launch it from within a GIS system (Manifold) by doubl-clicking a point on a map drawing. This passes parameters and the name of the .aspx page to lunch so as to display the data on the database associated with the point. The application is run on a PC under localhost
The problem is that unless I have already launched the ASP.Net Development Server the .aspx page will not display - get not able to display type of error message. Is there some way I can ensure that Asp.Net Development Server is always launched - either every time the PC is switched on, or by some code is the home page of the application?
Also:
a)is there a way of always making the ASP.Net Development Server run irectly under the root localhost port at present it usually is Port 1347.
b) If I deploy the application to another PC which does not have Visual Studio loaded, what do need to ensure the PC has installed to run .aspx pages?
|
|
|
|
|
I think you are using the built-in wev server which comes with VS 2005. This web server will be launched only when you run the web application from VS 2005. Instead, you can use IIS to host your web application.
Windows XP based PCs have IIS ver 5.x. You can use that to deploy you application so that you don't need to lauch everytime.
|
|
|
|
|
Ramesh - thanks for reply. I've investigated further and the problem seems to be with the fact that the Access database is opened. When I open the GIS application, because the GIS links to the Access database, the database is opened. When I try to open the .aspx page with localhost
ie, using Internet Explorer,
http://localhost/HA4Com/chamber.aspx?cname=2977-001
get error message file already in use
Exception details: System.Data.OleDb.OleDbException: Could not use; file already in use
If however I use the VStudio Development Server:
http://localhost:1347/HA4Com/chamber.aspx?cname=2977-001
it works Ok. Looks like VStudio development Server happy that Access database already open, but IIS is not.
Any way I can make localhost/IIS to accept the database already opened?
|
|
|
|
|
I can use Session on login.aspx.cs.
so I used like this.
// Session["Id"]= id;
and I can see components of Session, when I type "Session".
but I can't use that another aspx.cs. page, for example, board.aspx.cs.
There are only two values. SessionPageStatePersister and SessionParameter.
That is all;;
I don't know why...
please let me know..
|
|
|
|
|
that class file is not inherited System.Web.UI.Page class ? If it is then you will be getting Session while development.
|
|
|
|
|
Oh, THank you very much.
you are right.
that class file was not inherited System.Web.UI.Page class.
Really thank you.^^
|
|
|
|
|
Hi all,
Iam using a hidden textbox in my form...when i update the value of the Hidden textbox in server side - when i check a checkbox , and i take the value of textbox in client side in a button click .
The value of the textbox reamins empty qwhen i take the value in client side
client side code::
var str= document.getElementById("Hdncode").value;
when i update the value of textbox in clent side it takes but when i update thro server side it not updating ...
in myForm i didnt wrote any code to clear the textbox value any wer then y it happens any reason ..
can any one help me
|
|
|
|
|
post your server side code for better understanding
One person's data is another person's program.
--J.Walia
|
|
|
|
|
This is the server side code for check changed
Private Sub chkselallitems_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkselallitems.CheckedChanged
dim str as string
For i = 0 To grdexam.Rows.Count - 1
str+= grdexam.Rows(i).Cells(1).Value & ","
next
hdncode.value=str
End Sub
when i updatethe hdncode.value in server side it is not reflecting if i take in client side
can any one tell the reason
|
|
|
|
|
I'm making a login page with ASP.NET with C#.
and I know that it needs to use Session for saving information of loggined user.
so I used Session like this on "login.aspx.cs" with Login View Control.
[login.aspx.cs]
// Database query.
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Join"].ConnectionString);
SqlCommand cmd = new SqlCommand("SELECT * From User WHERE id = @ID", con);
cmd.Parameters.AddWithValue("@ID", ((TextBox)LoginView1.FindControl("TextBox1")).Text);
string name = rd["name"].ToString();
string pw = rd["password"].ToString();
string pw1 = ((TextBox)LoginView1.FindControl("TextBox2")).Text;
string id = rd["id"].ToString();
// Save to Session variables. There are a lot of components about Session. Keys, Item, Add,
//and so on..
Session["memberid"] = id;
Session["membername"] = name;
if ((string.Equals(pw, pw1)) == true)
{
FormsAuthentication.RedirectFromLoginPage(name, false);
}
....
And I made codes like this whether lggined user is same with Writer on board or not.
[Board.aspx]
public static bool IsWriter(string pdsId, string Writer)
{
string sql = "Select id From t_Pds Where boardId = @boardId And writer = @writer";
SqlCommand cmd = new SqlCommand(sql, DbConn.GetConn());
cmd.Parameters.AddWithValue("@boardId", pdsId);
cmd.Parameters.AddWithValue("@writer", Writer);
cmd.Connection.Open();
string result = (string)cmd.ExecuteScalar(); // result = ID of writer value.
cmd.Connection.Close();
// I can't use Session. When I use "Session", there are no components of Session.
// There are only two values of Session. ( SessionPageStatePersister , SessionParameter)
if (Session["memberid"] == result) //ERROR.
{
return true;
}
else
return false;
}
}
|
|
|
|
|
Cross-posting won't help you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
How do I get a aspx page function in App_code class file in asp.net 2.0.
please sent a demo code.
|
|
|
|
|
You cannot get a function defined in the aspx code behind file in the App_Code class file. Because the instance of the aspx class is created based on the request by the browser in IIS at run time. You can try a static function but it isn't good practice.
You need to define the functions used across the application in another App_Code class file.
|
|
|
|
|
Hi,
In a gridview i have taken the three buttonfields.At one time i am showing the gridview with those three buttonfields.But at some time i dont want to show those three buttonfield i.e., i want to make it invisible.
How can i do it...
Thanks in advance..
|
|
|
|
|
Do you want to make invisible the columns of the three button fields in the GridView or you want to make invisible the button fields in some rows?
|
|
|
|
|
i want to make those three columns invisible.
|
|
|
|
|
Assume that the three button field columns starts from 4th column of the GridView, then
gvYourGridView.Columns[3].Visible = false;
gvYourGridView.Columns[4].Visible = false;
gvYourGridView.Columns[5].Visible = false;
|
|
|
|
|
Hi,
I have defined a hyperlink in a gridview but the problem is i want extract the value of that hyperlink in a textbox.since i am trying it i am getting a null value.Hyperlink is the 1st column in the gridview and also i am using the update panel.
Please any body can solve it..
Thanks in advance.
|
|
|
|
|
Can you post the portion of the code where you extract the value of the hyperlink.
Try this:
LinkButton lbtnYourHyperLink = (LinkButton)(gvYourGridView.Rows[rowIndex].FindControl("lbtnNameOfLinkButton"));
if(lbtnYourHyperLink != null)
textbox1.Text = lbtnYourHyperLink.Text
|
|
|
|
|
I have a web.config Root folder of my application and another web.config in a sub folder.
I want the sub folder to use the web.config present in the Root..
can you help to me.....
|
|
|
|
|
The configuration settings specified in the web.config from sub folder will always override the settings of the root folder web.config.
If you want to use the parent folder configuration settings, then remove the same configuration fron sub folder's web.config. Then it will be taken from root web.config by the application.
|
|
|
|
|
I am working on a DLL that will be licensed per domain and am trying to figure out the best way to handle subdomains.
How are sub-domains typically setup? I thought something like
c:\websites\domainX\www -> virtual directory for www.domainX.com
c:\websites\domainX\store -> virtual directory for store.domainX.com
Where would the DLL need to be so both "web sites" can use its functionality?
Or should the sub domain be setup directly under the www directory
c:\websites\domainX\www\store -> virtual directory for store.domainX.com
if the bin folder is also under \www will the subdomain site still have access to it? I think if someone navigates to www.domainX.com/store the answer is Yes but if they navigate using store.domainX.com the answer would be No because the root folder is now the Store folder.
I currently only have access to XP and IIS5 for development. How can I emulate subdomains in this environment?
|
|
|
|
|
Hi
I have a web application that iam running on an intranet, from this web application iam trying to open another access application that is found on the same server where i deployed the web application. I ust want to open the access application and to do that iam using
System.Diagnostics.Process.Start(System.Configuration.ConfigurationManager.AppSettings.Item("Path"))
in web.config key is:
<add key="Path" value="\\192.168.1.11\Shared\db\bdl_results.mdb"></add>
on my testing machine it is working fine but when i deploy at the customer site i get access denied error. Any ideas and thanks
|
|
|
|
|
samerh wrote: System.Diagnostics.Process.Start(System.Configuration.ConfigurationManager.AppSettings.Item("Path"))
in web.config key is:
<add key="Path" value="\\192.168.1.11\Shared\db\bdl_results.mdb">
First of all this will be always execute only on Server.
samerh wrote: on my testing machine it is working fine but when i deploy at the customer site i get access denied error.
In local system, you are doing it from VS, and its having it own ASP.NET engine and which has sufficient permission to access, read, write files in your local system.
But when you deployed it on IIS, Its runs on "Network Services " identity, which has minimum privilege to access your system. That is the reason you are getting the error.
Resolution :
1. Give the required privilage to that file.
2. Create Own Application Pool , Change the Identity of Application Pool to "Local System" . Assign the Application Pool to your virtual Directory.
I will suggest you to go with Option 2
Please let me know if any issue.
|
|
|
|
|
I am using javascript to print page from asp.net. Always print a empty page following the content. Pls help me to avoid empty page while printing ?
Thanks.....!
|
|
|
|