|
Hi,
I am getting frustrated trying to test a new ASP .NET website in IIS on my local machine. Used to do this all the time in VS2002/2003, but since I started using VS2005 I've been happy with the new, built in "Development Server". I am presently trying to troubleshoot a new site that works fine when built in a local folder and run using the Development Server but has issues when uploaded to the production server. Thinking I might gain insight by deploying to IIS on my development box I did so, but find that while I can code files and build the project using VS to the ISS virtual directory (http://localhost/ASPTest/), I cannot run the app - the browser always issues a 403 permission error: "(HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage." WTF? I have tried everything I could think of with the permissions in the IIS manager applet but to no avail, and the same things happens with even a bare bones project - just a blank Default.aspx page. How can I create and build a page to an IIS folder from VS but then not have persission to view in in a browser, all on the same machine?!?
Mitchell
|
|
|
|
|
How did you deploy the application ? Create the virtual directory or just publish the Application and place the folder over inetpub>wwwroot.
Did you check the Authentication Mode ? What is that ? Is it Windows or Anonymous ?
|
|
|
|
|
Thanks for trying to help.
I've tried several different ways of setting it up, the simplest of which was to create a folder C:\Test, create a virtual filder in IIS (also named "Test") pointing to it, then creating a new website project in VS with Test in IIS as the project folder. VS creates Test.aspx and Test.aspx.cs in the Test folder, which I can see in C:\Test from Explorer and in the virtual folder Test in IIS. I build the project and can run the site (Ctrl-F5) in the Development Server but I cannot "Browse" the site, either from IIS or by selecting "View in browser" from the Solution Explorer.
Mitchell
|
|
|
|
|
What access permissions you have given to Virtual Directory during Creation.
You are required to give
1.Read
2.Run Scripts(Such as ASP)
3.Execute
Did you checked all three options.
Secondly, try giving the permissions
Right click on the Virtual directory from inetmgr
From submenu
All Tasks -> Permission Wizard
Follow the steps.
|
|
|
|
|
Thanks for trying to help.
Access permissions are already as you indicate:
1.Read
2.Run Scripts(Such as ASP)
3.Execute
I tried the Permission Wizard and selected "Public Web Site" but the problem persists.
Any other ideas?
Mitchell
modified on Wednesday, January 14, 2009 12:12 PM
|
|
|
|
|
Hi All,
When user navigate pages if the session expires I want to show alert message and redirect login page.
I written code for above reqruirement it is loging out but does not show message.
My code as follows
default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
Common comm = new Common();
if (Session[USER_CONTEXT] != null)
{
// do something...
}
else
{
// I want show javascript alert message to the user then click OK , redirect to logOutURL
comm.LogoffTohome();
return;
}
}
Common.cs
public void LogoffTohome()
{
string Jscript = "javascript:alert('Your session is over')";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "SessionTimeout", Jscript, true);
Session.Abandon();
HttpContext.Current.Response.Redirect(System.Configuration.ConfigurationManager.AppSettings["LogoutUrl"].ToString());
}
I really appreciate if your help...
Thanks
Rao
Thanks & Regards
Rao
|
|
|
|
|
Try firefox and firebug to debug javascript. Or vs 2008. You don't need
change string Jscript = "javascript:alert('Your session is over')";
to string Jscript = "alert('Your session is over'); window.location('" + System.Configuration.ConfigurationManager.AppSettings["LogoutUrl"].ToString() + "'); ";
You should redirect from javascript after the alert.
I didn't get any requirements for the signature
|
|
|
|
|
Thank you so much...
Thanks & Regards
Rao
|
|
|
|
|
Hi
In my online application I have to use paypal(Express checkout) for credit card processing. I have downloaded the required files given by them and added in my application, While compiling it gives an error The name 'UrlEncode' does not exist in the current context . The error occurs in the below given block of paypalfunction.cs(the class provided by paypal)
<br />
public string HttpCall(string NvpRequest)
{<br />
string url = pendpointurl;<br />
<br />
string strPost = NvpRequest + "&" + buildCredentialsNVPString();<br />
strPost = strPost + "&BUTTONSOURCE=" + <big>UrlEncode</big>( BNCode );<br />
<br />
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);<br />
objRequest.Timeout = Timeout;<br />
objRequest.Method = "POST";<br />
objRequest.ContentLength = strPost.Length;<br />
<br />
try<br />
{<br />
using (StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream()))<br />
{<br />
myWriter.Write(strPost);<br />
}<br />
}<br />
catch (Exception e)<br />
{<br />
<br />
}<br />
<br />
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();<br />
string result;<br />
using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))<br />
{<br />
result = sr.ReadToEnd();<br />
}<br />
<br />
<br />
return result;<br />
}<br />
Any help to solve this issue will be appreciated; Thanks in advnce...!!!
Sebastian
|
|
|
|
|
Sebastian T Xavier wrote: strPost = strPost + "&BUTTONSOURCE=" + UrlEncode( BNCode );
use HttpUtility.UrlEncode()
|
|
|
|
|
Hi,
I have an IFRAME in my webpage. On button click I need to send some data from the form to IFRAME source page. Since the Iframe source page uses request.form(<param name="" />) I need to send this information by post method. On button click if i submit the form, will all the data from the form will be sent to the Iframe source page . Is it possible to send the selected data in submit method.
How can I achieve that?
regards
vj
|
|
|
|
|
Hi All,
I am working on webpage which has a GridView with Employee info. I need to show there address, phone etc on Hover as a tooltip or opening a popup window. And when mouse out it should be disappear.
I am using HoverMenuExtender for this and it works find but HoverMenuExtender flashes on screen when page loads. It is kind of repaint the whole screen and user can see what's going on, which suppose to not.
I tried to hide panel also tried to hide grid itself but no luck so for.
Please any one can help me, it's an urgent.
Thanks,
Kamlesh
modified on Tuesday, January 13, 2009 4:39 PM
|
|
|
|
|
|
|
|
I have a report viewer on a asp.net 2.0 page. This page uses a master page which contains: "DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" ".
I am having this problem where the control is taking up the page appropriately, however, the report is not taking up the control. The report seems to only put 20 characters to a line with of course plenting of space to the right to grow. If you export the report, it looks fine, it is just in the display inside the report viewer.
|
|
|
|
|
Hi Geeks,
Can some pls help me in this problem ?
My Web application has timeout set to 90 sec(which is default) and the DB commandtimeout changed to 90 sec (default is 30 sec) , if my application runs more than 90 sec i get the Timout error from DB, so i increased the DB timeout to 200 sec, now the query works fine, but what is the purpose of the web request timeout which is 90 sec ?
Actally speaking when the request takes more than 90 sec it shd through me an error ? right ?
Note : The application is publised and not in debuig mode.
|
|
|
|
|
You can set your aspscript timeout here:
IIS->your website->right click->properties->home directory->configuration->Option
set Asp Script Timeout
if your error still exists, paste your error exactly here
Human knowledge belongs to the world
|
|
|
|
|
Thanks for your timely reply..
I dont want to change the timeout, i want to knw why does the request still exists even after 90 secs of its default timeout
|
|
|
|
|
Database - Connection TimeOut :
When you cannot connect to the "Database Server" within specific time period, it will give you error.
Database - Command TimeOut :
When you cannot retrive data from the "Database Server" within specific time period, it will give you error.
Request TimeOut :
When you cannot Request the Page/Data from the "Web Server" within specific time period, it will give you error.
Session TimeOut :
When your Page is not postback (or no trasfer activity) to the "Web Server" for specific time period, it will destroy the session object.
|
|
|
|
|
|
Muruvet Kaplan wrote: cannot be serialized because it does not have a parameterless constructor.
That error message is clear right?
|
|
|
|
|
Hi,
as the error message is saying it, the FileInfo cannot be serialized/deserialized because the deserialization needs a constructor without parameters. So what you could do is to build your own FileInfo/DirectoryInfo class.
Also you could try to customize the deserialization process, but i'm not sure if this is possible.
Regards
Sebastian
|
|
|
|
|
http://www.dalepreston.com/Blog/2005/02/returning-custom-classes-from-web.html[^]
I want todo returning FileInfo type because i tried to file reading from server, but these files are encrypted and needed to be open from special project then read. the files are in server and size is out of 1 GB. my question is about a method to be able to read file from service and returning to the project...
Thanks for replies.
mkn
|
|
|
|
|
If you need infos about the file from the server, you have to create your own FileInfo-class containing the properties you need.
<br />
public class MyFileInfoClass {<br />
<br />
public Name { get; set; }<br />
public FullName {get; set; }<br />
<br />
}<br />
Just create this object before you return the result of your method and fill the properties using the FileInfo on your server.
Btw. if you want to read the content of the file you have to transfer the file and not the FileInfo.
Regards
Sebastian
|
|
|
|