default.aspx

Why ASP.NET MVC bothers to have a Default.aspx file?

When create a new ASP.NET MVC project in Visual Studio 2008, there is a Default.aspx page by default. It has one line <%-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. --%> In its Page_Load function, it just redirects to "/" to go thro...

Default.aspx being served when debugging locally

Any ideas why the built in asp.net webserver insists on serving "/default.aspx" whenever you browse to the root "/"? Even if you force the global.asax to redirect to "/" whenever "/default.aspx" is detected it will see "/" as a request to "/default.aspx" and an infinite loop ensues! Anyone have a way around this behaviour? ...

URL Rewrite from /default.aspx to /

I'm using the URL Rewriting.NET tool with IIS 6. I've got my default page content set for default.aspx in IIS. What I'm trying to do is have /default.aspx provide a 301 redirect to the root directory (www.example.com/default.aspx -> www.example.com). I've tried turning off default documents, to no avail. What I'm hoping to do is use a ...

retrieve the hidden default.aspx segment of a url

I tried to display the url using all sorts of methods of HttpRequest, I tried VirtualPathUtility object as well, but I never was able to display the hidden portion "default.aspx" of the default... what is the method or property that retrieves this segment of the url? reason being, I am so close to creating a 404 on application level tha...

ASP.Net MVC On IIS6 default.aspx

Hi I am having an issue where when deploying an MVC site onto an IIS 6 server the url schema is broken. I have followed all the examples for getting IIS 6 to work with MVC and this seems to be ok. The problem is that on all of my IIS 6 request the /default.aspx is being appended to the url. Here is an example using the Route Tester de...

How to "merge" page "\Default.aspx" and "\"?

our site is developed in ASP.NET. We want to block Default.aspx page from Google and other search engines. How can we "close" the Default.aspx page so that it is not accessible? Or is there another way to solve the problem so that we don't create duplicate content. ...

ASP.net 4.0 default.aspx problem on IIS6

I installed .net framework 4 on my windows 2003 enterprise x64, wrote simple asp.net 4.0 application (default.aspx page only). The application works great if request is to default.aspx, not to the root site: contoso.com/ - doesn't work (Get 404 error) contoso.com/default.aspx - works. Default.aspx is in list of default documents in II...

remove default.aspx from a request

i am trying to remove default.aspx from any request that might have it. protected void Application_BeginRequest(object sender, EventArgs e) { HttpContext context = HttpContext.Current; string url = context.Request.Url.ToString(); // remove default.aspx if (url.EndsWith("/default.a...

The best way to refresh my .aspx site with a Timer in C#?

I have a default.aspx page that needs to be refresh every 10 sec. My solution so far is a javascript function, but it only works in Firefox and not IE. I'm looking for a way to handle the refresh mecanism in the default.aspx.cs page instead, with some sort of Timer. Any good simple sugestions/hints or solutions out there that can lea...

Loading a web site to me IIS

A developer just send me a running website files from IIS directory. I want to know if I can run the website on my PC. The file contain "Default.aspx" file, which I assume is of some importance. I want to know if it is possible to run the website on my PC, I have installed IIS and I placed the file in the wwwroot folder, but unfortunate...

POST to default page

Why is it not OK to do a HTTP.Post to the default page on ASP.NET I have a default.aspx file that i want to be accessed when an external utility do a post to the http://{ip}/WebSiteName I want that the actual post will be to this page: http://{ip}/WebSiteName/Defualt.aspx or http://{ip}/WebSiteName/Handler.ashx I thin...

How to submit an ASPX form using C# on the Pageload event

I have form tag in an ASPX page, <form id="payForm" method="post" action="<%Response.Write(URL);%>" runat="server"> </form> On the pageload event, Literal mylit = new Literal(); mylit.Text = string.Format("<input type=\"hidden\" name=\"{0}\" value=\"{1}\" /> \n", name, value); payForm.Controls.Add(mylit); How do I make my form to ...