Replacing Default.aspx as default document

I'm using a different default file for folders. I need to use MyPage.aspx as a default so if someone loads /Folder it will load up MyPage.aspx instead of Default.aspx. I configured IIS to do this properly but changing the documents setting but I don't knwo where to change this on the local VS asp.net development server. When I go to /Folder i get a directory listing instead of executing MyPage.aspx.

 

-1
MichaelIsGreat
6/11/2008 3:03:10 AM
asp.net.web-forms 93655 articles. 3 followers. Follow

9 Replies
735 Views

Similar Articles

[PageSpeed] 47

Try setting the enable Directory Listing to false in IIS


Vikram
www.vikramlakhotia.com


Please mark the answer if it helped you
-1
vik20000in
6/11/2008 4:07:11 AM

It's not an IIS problem. IIS works perfectly.

It's a problem during development and testing on the local VS asp.net development server that comes with Visual Studio.

-1
MichaelIsGreat
6/11/2008 4:30:00 AM

try this:

right click on your project and you can see an option called property pages in that choose start options and enter your page name.

propertypages>startoptions>


"Never underestimate the power of stupid people in large groups"
-1
deesh1531982
6/11/2008 4:38:34 AM

Go to IIS

Right click your sitename and select properties.

Now in the Documents Tab, Add your File name and move it to the top.

And you rae done

 

-1
SarabjitSohal
6/11/2008 4:47:19 AM

deesh1531982:

try this:

right click on your project and you can see an option called property pages in that choose start options and enter your page name.

propertypages>startoptions>

That will only execute the page when the project first starts. That doesn't change the default page that loads when navigate to a folder directly.

1
MichaelIsGreat
6/11/2008 5:06:05 AM

SarabjitSohal:

Go to IIS

Right click your sitename and select properties.

Now in the Documents Tab, Add your File name and move it to the top.

And you rae done

It's not an IIS problem. IIS works perfectly.
It's not an IIS problem. IIS works perfectly.
It's not an IIS problem. IIS works perfectly.

It's a problem is during development and testing on the LOCAL asp.net development server that comes with Visual Studio.

I really do appreciate your attempt to help but PLEASE understand it's not an IIS problem. IIS works perfectly. It's not even related to IIS. IIS has nothing to do with this since i'm only talking about testing on my LOCAL desktop using the webserver that comes with VS.

 

-1
MichaelIsGreat
6/11/2008 5:10:08 AM

Whooooo. Please calm down a little ;-)

AFAIK, there's no way in Visual Studio/Cassini (Cassini is the light-weight webserver built-in to VS) to get the behavior of a default document, like in IIS. What you can do however is to create a Default.aspx which simply redirects to the page of your choice. It would work in both environments.

There are third-party Cassini implementations like UltiDev Cassini, which will allow you to configure Cassini in a more advanced way than what's possible with the built-in Cassini (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE)


If this post was useful to you, please mark it as answer. Thank you!
1
johram
6/11/2008 5:17:02 AM

Please try the IIS solution once.

It will certainly help on Local asp.net development server as well.

 

-1
SarabjitSohal
6/11/2008 5:24:19 AM

johram:

Whooooo. Please calm down a little ;-)

That was the calmer version of the original post. Even after all my posts explaining that this has nothing to do with IIS and yours talking directly about, what I now learn is called cassini, someone still comments that I should modify IIS.

Thanks for your post, I'll look into UltiDev's version of Cassini.

-1
MichaelIsGreat
6/11/2008 5:38:16 AM
Reply:

Similar Artilces:

I've placed <forms loginUrl="home.aspx"></forms> in web.config and now all users that log in go to default.aspx
I've placed <forms loginUrl="home.aspx"></forms> in web.config and now all users that log in go to default.aspx.        <authentication mode="Forms">        <forms loginUrl="home.aspx"></forms>      </authentication>What attribute I should add, to make the user stay on the same page. Btw when I remove  <forms loginUrl="home.aspx"></forms>, users stay on the same page after login.Thanks. try one of these.....

how to convert web page default.aspx to default.html
hi all,   I have developed a web application using ASP.NET. Now i want to convert that web page default.aspx to default.html. Can anybody tel me how can i convert default.aspx to default.html. thanks   Please explain your query more.. do you want to programatically save your webppage as .html file???SSNPlease remember to click "Mark as Answer" on the post that helps you. Hi,     Right Click on your webpage in Solution Explorer, Rename your webpage , change its extension to .htm and save it, your web page will become html page. Regards A...

When I create default.aspx then default.vb. Then how do I combine it? (Visual Web Developer 2005)
I am having trouble with one simple annoying problem. I  could not find the answer to this problem on google. I want to combine those two files above into one for asp.net Visual Web Developer 2005.  Anyone please help?   I am curious to know how you came to have the 2 files set like that.  Usually you have a default.aspx, which is your presentation file, and then you have the corresponding default.aspx.vb file which is your code-behind.  Your tool should be generating both the files for you when you add a new aspx file to your project.C# / C++ Developer ...

Is there a link from the default.aspx to the admin/default.aspx page?
Hi there, Is there a link from the default.aspx to the adminLogin.aspx or the admin/default.aspx page? I cant seems to go to the admin/default.aspx page after i login at the adminLogin.aspx page. It redirects back to the default.aspx instead. Very odd. Try deleting your cookies and hitting /admin/ again. Typically, the ReturnUrl is passed to the adminLogin page, and then a cookie is set from there. If you're getting redirected back to the main page, then something is amiss with your cookies, I fear. Try that and let us know if that works. If not, we'll head down anothe...

Default.aspx+Default.aspx.vb + \App_Code\Something.vb Combine into single.aspx
I have downloaded sample codes that have 3 parts:- Default.aspx+Default.aspx.vb + \App_Code\Something.vb If I would like to combine them into one single.aspx, what position and order I should put these codes ? Thanks  Thanks in advance for the help. I will try to credit the ones who helped but most important is we really do sincerely thanks to all who have helped. Copy all the code in default.aspx to simple.aspx. have a script tag and copy all the code from Default.aspx.cs here: <script runat="server">protected override void OnLoad(EventArgs e) {base.OnLoad(e)...

Why does IIS default to default.aspx?
 Hi all, I'm not sure why this happens, but in IIS on my development box I have a virtual set up to use the ASP.NET 2 framework.  I have enable default document checked and I added a document name of test.aspx.  For some reason when I go to the virtual http://localhost/mysite/   the application defaults to a default.aspx which is not found.  It will not try to default to the test.aspx page.  Is there something I can do in IIS to force the test.aspx page to be my default page. Thanks  in the properties of the web site with iis, you can specif...

default.aspx and default.master
Hi I have just begun using VS 2008 I am not understanding why when I create a new web project and a default.master, then when I create a default.aspx I do not get the option to use the master page like I'm use to getting in VS 2005 what have I missed. Can someone please help.   DKBDKB  when creating a new webpage rather then selecting 'webpage' select "web content form".mark this post as ANSWERED, if you find it helpful...

Default page != default.aspx
Greetings eartmen! I've the following concern: I have all the pages in my project secured (i.e. accessing any of them requires successful login). What I want is when any user tries to access a page (for example AdminUsers.aspx) he would have to log in. FormsAuthentication could do this for me, so I have a code snippet for it: private void btnLogin_Click(object sender, System.EventArgs e)         {             if(checkPassword(tbUsername.Text, tbPassword.Text)){      &n...

How to transfer Default2.aspx to Default.aspx, where Default.aspx is written in WML and have 2 cards in a deck.
 How to transfer Default2.aspx to Default.aspx, (where Default.aspx is written in WML and have 2 cards in a deck) and (Default2.aspx is a Mobile Web form).I want to redirect to card2 of Default.aspx from Default2.aspx.I have tried Resonse.Redirent("Default.aspx#card2") and tried it in openwave simulator .The wesbsite works fine as i move from default.aspx(card1 then card2) and then default2.aspx but when i try to redirect to default.apsx card2 using Resonse.Redirent("Default.aspx#card2") it gives this error.Server Error in Apllication The resource cannot be found De...

default.aspx route not working; Are we Forced to redirect default.aspx?
Hi,My route for default.aspx isn't working, can't figure it out??  routes.Add(new Route("default.aspx", new MvcRouteHandler())  {       Defaults = new RouteValueDictionary(new { controller = "Home", action = "Index" })  });  I noticed in the sample application, the default.aspx.cs has a redirect to the Home view, is the redirect a must?    Yeah, this is an issue. I can't remember the reason why it happens, but I'd like to know if it will be resolved before 1.0?For now tho you can repla...

web.config , login.aspx and default.aspx
Hi, My application is in a folder (\admin). When a user ask the \admin\login.aspx page, it is directed on root\default.aspx instead of admin\default.aspx by : FormsAuthentication.RedirectFromLoginPage(UserName.Text, false) How to make so that functions normally ? Thank you for your assistance. Hi, Can you explan it more clearly? where is the login page for your application is your application in the root directory? FormsAuthentication.RedirectFromLoginPage will direct to the ReturnURL path which appears in the browser. check what is the ReturnURl you get. ...

How Do I use a Function from my default.aspx.cs file within the default.aspx
Hello,  I really like the ability to create a .ASP page and call it public functions. Then include that page anywhere and call those functions within the webpage. How do I achieve this in ASP.NET? So I have a function in my .cs file and I want to call it withing my webpage. I dont want to do everything wthing the page_load function usint response.write because the HTML is not coloerd and it just does not look nice. Any ideas? ThanksOh Lord, you can image where it goes from here. He fixes the cable? be05x5:I really like the ability to create a .ASP page and call it public function...

how can i take default.aspx.label1.text to default.aspx.label1.text ? i wait for your help :)
hello  how can i take default.aspx.label1.text to default.aspx.label1.text ? i wait for your help :) default.aspx.label1.text =default.aspx.label1.text is it true ??? thank you for your help :) best regardsMark as me if my question or my answer can be helpful for you :) your quection is not clear default.aspx.label1.text =default.aspx.label1.text  u wrote same page and control.. what do u need actually could u describe more specific.. If you need to pass the value of label 1 from one webform to another check below link Ways to pass data between webformsHaissam Abdul ...

How to set the a URL as default page other than default.aspx?
How to set the a URL as default page other than default.aspx? Hi, Folks I have a urgent question: For example, I want to set http://mag/DotNetNuke/Default.aspx?tabid=1&g=forum&c=1 as my first page when launch the DotNetNuke. What should I do? Thank a lot MJ download magicHyperRedirect at www.magicmodules.com a free module Create a new tab with magicHyperRedirect on redirecting to your link... On site settings set new tab as home tab.... Means a redirect on each home page load though.Visit www.dnnnotes.com - index of DNN threads - hand picked quality ...

Web resources about - Replacing Default.aspx as default document - asp.net.web-forms

Facebook Tests Replacing Keyword Ad Targeting With Broad Category Targeting
Facebook is testing a major functionality change for its self-serve performance ad tool that would replace the specific Like keyword targeting ...

Replacing a Pebble Smartwatch screen - YouTube
I got a broken Pebble from a friend, and fixed it with a dremel, some epoxy, and a replacement screen. Total cost of $30.

School apologises for taking cane off blind boy and replacing it with pool noodle
A primary school has apologised for taking away the cane of an eight-year-old blind boy and replacing it swimming pool noddle as a form of punishment. ...

Music teachers outraged over CDs replacing accompanists
Whether it is violin, flute or percussion, each year tens of thousands of nervous children across Australia are guided through their music exams ...

Inner south residents worried about high-rises replacing public housing flats
Residents say the&nbsp;government&nbsp;is over-developing its inner south blocks to maximise their sale value.

Apache Software Foundation unveils Hadoop 2, replacing MapReduce with YARN
The Apache Software Foundation unveiled its latest release of its open source data processing program, Hadoop 2. It runs multiple applications ...

Australia spends $110 million a year replacing lost coins
Australians lose 255 million coins every year - down the back of our couches, taken overseas in the pockets of tourists and stuck to footpaths. ...

AMD appoints Lisa Su as first female CEO, replacing Rory Read
AMD has appointed Lisa Su chief executive officer to replace Rory Read, swapping an executive who has stabilised the second-biggest chipmaker's ...

A case of one bad government replacing another
THERE is a widening gap between the sort of government a Tony Abbott-led Coalition will need to become to steer the nation successfully in the ...

Beme: the app replacing illusion with reality on social media
Beme sends video from your phone to your friends, without giving you the chance to preview, review or touch it up.

Resources last updated: 11/22/2015 5:32:35 PM