I'm developing the most simple ASP.NET application which is giving me an annoying error.
I'm having a textbox- and a button-control, where I would like the text in the textbox to be saved to a database table when clicking the button. The text will be propagated to the database by means of a WCF service.
Since I'm a rather mediocre programmer, I tend to get errors now and then which results in lots of error messages displayed in the browser. That I can understand. I fix them and build my solution and press F5 to get going. But after fixing the errors, everytime the browser displays a directory listening like the one below instead of my astonishing UI.
Directory Listing -- /
Monday, December 20, 2010 10:10 PM <dir> bin Saturday, December 18, 2010 10:10 PM 1,303 MainForm.aspx Monday, December 20, 2010 10:28 PM 467 MainForm.aspx.cs Saturday, December 18, 2010 10:09 PM 2,118 MainForm.aspx.designer.cs Friday, December 17, 2010 10:25 PM <dir> obj Friday, December 17, 2010 10:25 PM <dir> Properties Sunday, December 19, 2010 10:09 PM <dir> Service References Monday, December 20, 2010 02:01 PM 5,552 SimpleChat.csproj M开发者_运维技巧onday, December 20, 2010 02:01 PM 1,170 SimpleChat.csproj.user Sunday, December 19, 2010 10:09 PM 1,810 Web.config Friday, December 17, 2010 10:25 PM 1,285 Web.Debug.config Friday, December 17, 2010 10:25 PM 1,346 Web.Release.config
Version Information: ASP.NET Development Server 10.0.0.0
Why on earth is this happening?
I know how to work around but its tedious: in MainForm.aspx.cs I comment the rows concerning the call to the service, then I rebuild the solution, uncomment the call to the service and rebuild the solution again. Then everything works as expected till I ran into the next bug.
Thanks for reading... ;-)
The easiest fix for you is to right click on the page in your solution that you want to open when you run the project and select "Set as Startup page"
In the example above it would be "MainForm.aspx"
I'm no expert on ASP, but I'd say you're missing an index page.
@Lee Baker: If you type directory (ex: http://localhost:1043/projectname/images/
), it still listing directory
精彩评论