[2005] Default start page
I've got a site I'm working on
http://localhost/schoolruler/
I want that to go to DEFAULT.ASPX automatically - I thought I could set that as the START OPTION - specific page - but it's not working.
I've getting
The website declined to show this webpage...
most likely causes - this website requires you to log in.
How do I get around that?
Re: [2005] Default start page
Congrats on 10K!
Do you have a login page that is required?
Re: [2005] Default start page
Thanks!
And I think I just a couple more rep's away from getting another gem...
No login page that I can see - I believe it's an IIS setting - which I'm not seeing clearly how to get around.
Re: [2005] Default start page
Which version of IIS? I only have 5.1 but it is probably the same in other versions
In IIS open the properties for the web site.
Switch to the Documents tab.
Check the Enable Default Document box
Add Default.aspx to the list.
I am just guessing here because I think the above is the default setup.
Re: [2005] Default start page
It has DEFAULT.ASP - not .ASPX.
What is the difference between the ASP and ASPX??
Which makes me think - does this stuff ever get compiled - or is it simply interpretted at load time??
Re: [2005] Default start page
ASP is an old scripted VBScript mess from a few years ago. It is the 'equivalent' of web development when VB6 was all the rage. Now that VB.NET and C# are the rage, ASP.NET is the next generation of ASP and it uses aspx file extensions by default.
You said it has default.asp, you need to remove whatever's there and put in default.aspx.
Second, if you use codebehind code then yes, it gets compiled when you build it (Ctrl+Shift+B) and the DLL is placed into the BIN folder. You must have noticed the BIN folder.
In ASP.NET 2.0 it gets compiled into a DLL the first time it's accessed and placed into the BIN folder. Run-time compilation. There's also the option of precompiling your ASP.NET application and putting it in your BIN folder and then deploying. For you at this point the difference is irrelevant.
Re: [2005] Default start page
Oh I should add this to confuse you. If you use inline ASP.NET code, which looks like this
Code:
<asp:Label id="lbl1" runat="server" text="<%# DataBinder.Eval(blahblah) %>"/>
then that is interpreted rather than compiled at runtime. It uses System.Reflection to read the existing DLLs that were created due to the codebehind to determine what it has to do and then does it. As a result, it is considered bad practice. In fact, it's downright blasphemy. It's just an FYI, so you keep in mind that you shouldn't be doing it.
Re: [2005] Default start page
I see no BIN folder.
I've been doing all this work with it appearing to go into C:\INetPub\wwwroot\{pagename}
I did the Build and a Ctrl/Shift/B - no BIN folder in there
Re: [2005] Default start page
Yes, ASP.NET 2.0, it'll be a runtime thing for you.
By the way, when creating this web project, did you specify the project type to be "http", "file" or "ftp"? You'll know when you run the project, do you get a balloon tooltip mentioning some random portname, such as localhost:8821 ? Or do you browse to it using http://localhost/mydirectory/something/pagename.aspx ?
Re: [2005] Default start page
You told me to use HTTP - and then yes I just pop into IE and browse to http://localhost... and it runs the page.
You have to remember to save all before doing this I seemed to have noticed.
And I did need to run in debug in the IDE last night - so I figured that out. Was very much like working with pocket-pc's and emulators that I've done.