ASP.NET site works through VS, but not through browser - asp.net

I don't have the code in front of me right now (but will in an hour or so), but suspect that the solution is very simple so I'll post a general description of the problem and update it later:
Problem:
A site built on ASP.NET works fine when browsing it through Visual Studio, but when attempting to connect via browser, it complains about looking for a default page (I can update later with the exact error).
Details:
Our development team is trying to set up a (VERY) simple wiki server for our internal project using SEWEN WIKI, a wiki server based on Wikiplex. None of us are web developers.
I'm 99% positive that it's something as simple as creating a index.html or something as an entry point for the browser, but I'll admit my domain knowledge here is about 0.
IIS has been updated to 7.5 (min required is 7), and ASP.NET has been upgraded past 4 (the required version). The operating system is Windows 2008 Server, and the wiki is developed in Visual Studio 2010.
If anybody has any ideas, I'd love to know. Thanks!

Assuming that you have ASP.NET enabled on your server as #Patrick suggests in the comments, it's possible that you need to configure a Default Document as #ScottSelby suggests.
Here is documentation on this topic from Microsoft: Configure the List of Default Documents in IIS 7
I've illustrated this below:
In the Features View of IIS, click Default Document:
In Default Document, ensure that you have your designated page, commonly default.aspx:

Related

ASP.NET - How to Deploy in VS Express 2013 for Web?

Ok, so I have been creating the same project like 15 times now, have created it in 2008, with the .NET Framework of 3.5 (New Web Site, New Web Project, and OMG, like all different ways). Have deployed this, however, when I try to load it in localhost, (because I am building these Applications directly from within the Server), I get all kinds of errors. Than I get an error that says, needs to use .NET Framework 4.0.
So, in order to use .NET Framework 4.0, I need to have atleast VS Express 2012, so I get VS Express 2013 and Rebuild the Application again, but this time, I do not see option for Web Application in this software, I see this: ASP.NET Web Forms Application, there is an option for ASP.NET Empty Web Application and I have done both of these damn things! Not sure which one is supposed to actually work.
For the Forms Application, I don't see any option to Publish it, only to Build!
In any case, how the hell are you supposed to transfer your VS 2013 .NET Framework 4.0 Web Application so that it will work on the actual SERVER (Public URL)? How to do this is baffling the hell out of me. No matter what I do I get errors, I can't even get VS Express 2013 to even work when building it, since it gives me 500 error or Page Not Found 404 Error. Atleast with VS Express 2008, I got some errors on the page that told me that the aspx file actually trying to load in the browser.
How do you deploy this project in VS Express 2013 for Web Exactly? What are the steps to do this from within the actual SERVER itself? Also, I just want a simple web application that ties into an existing site (that will use an iframe on an existing page) that uses a Web Service. What application to choose to use? What type should be created? There are so many and they all seem the same to me! I believe the type should be ASP.NET Web Forms Application, but this doesn't seem to want to be published after working in it. It only Builds, and than I don't know how to put it on the Server after that. I have it in a folder on the server, but it loads nothing when I go to that page. It can not find the Default.aspx file. ARGGG! I am pulling out my hair now!
Perhaps there is a URL somewhere online that explains how to do this? From within the localhost itself?
You will see publish option if you Select your Website in the solution explorer and
1) right click it
Or
2) Go to Build menu on the top
Regarding project types:
-> If you select New Project -> You get option for creating a Web Application
-> If you select New Website -> You get option to create Website
You might want to upload some screenshots of your VS environment / errors to show what problem you are exactly facing.
You can create a Web Application Project in Visual Studio 2013 Express for Web. After creating the Web Application you can Publish it to the web but you need to create a profile. You can also publish to Windows Azure.
Some steps are shown in this article:
VS Studio 2013 Express for Web is also known to have a bug in its UI: here
If some items are missing in the UI, perhaps the application is corrupted and you may need to reinstall.

ASPX Page Not Found (Error 404), though it exists?

I have a C#.NET project and am having a problem with a single web forms, ASPX page when debugging my application. Most of my application works fine, but when I hit a particular page, I get an Error 404, resource not found. I don't understand this because the file does exist, and it exists in the path that is being referenced. And, I hit several other ASPX pages on the way to this one, without error.
Now, I should mention that this particular page was only recently added to the project. My coworker, who added the page, says he was able to get the page to work, but we have different environments. So, I'm sure that has something to do with it, but I don't know what. Below are the known details regarding the differences between our environments.
My environment
Windows 8.1
IIS Express
Visual Studio 2013
Co-workers environment
Windows 7
IIS 7
Visual Studio 2012
We are both running with the same source code, as well as the same site and application pool settings in IIS, which are pointed to run time 4.0 and in classic mode.
Does anyone here have any idea why this would happen, or what I might try to get past this?
I ended up fixing this by switching to local iis and enabling the Static Content option in Windows Features.

Visual Studio 2010 displays IIS 7 page on debug instead of my project

This is my first ASP.NET project so I am a bit of a rookie when it comes to a lot of the configuring of IIS/Visual Studio so bear with me...
I am using Visual Studio 2010 running on Windows Server 2008 SR2. We recently did some updates on the server and now my project no longer loads when I attempt to debug. When I try to debug the default "Welcome" page for IIS 7 loads instead of my project. I am set up to use the development server to debug, not IIS so I don't understand why I get the IIS page. Before the updates the debugger was pulling up my page without any issues.
Any ideas? Thanks in advance!
It looks like IIS is now bound to the port number that Visual Studio Development Web Server was using previously. You can change the port number in the properties of the web site project.
I have found a solution to my issue. I decided to use IIS instead of the Development Server for debugging. After attempting to debug unsuccessfully yet again, I took a look at the identity that was being used in the application pool and I changed to one with more privileges and that seemed to do the trick. Thanks for the suggestions.
I had the same problem but non-of the earlier answers worked.
I am using Windows 7 enterprise 64-bit, IE11, VS2010, Silverlight 5
I have been developing and maintaining a number of Silverlight projects for the past 5 years, and have always been able to debug them within VS2010 using the ASP.NET Development Server. However, on returning from some well deserved holiday, I found that none of my existing Silverlight projects would run in the debugger. In each case there is a Web project set as the start-up project, and in each case on starting the project within VS2010 (with or without debugging) I got the IIS7 web page instead of my application.
I tried creating a new Silverlight web application, and found that this started normally in the ASP.NET Development Server. I checked my source code and found that no changes had been made in my absence.
After a lot of head scratching, etc., the solution was to clear the IE cache. These are the explicit steps I used:
Close all instances of IE and ASP.NET Development Server.
Open Internet Properties from the Control Panel.
Click "Delete" on the General Tab.
In the Delete Browsing History box check the following options:
a) "Preserve Favourites website data"
b) "Temporary Internet files and website data"
c) "Cookies and website data"
Leave the others unchecked
5) Click "Delete" and wait for the command to complete.
6) Close the Internet Properties box.
7) Rebuild ASP.NET project
8) Start (with or without debugging) in VS2010 - it should now load normally.
Hope this works for you.

page is not served because it has been explicitly forbidden - extension .asp may be incorrect

I'm trying to run a test version of a web using the File System (i.e. the "Cassini" web server built-in to Visual Studio 2005) rather than (IIS 5.1 on my Win XP dev PC). This web is a hodge-podge of classic ASP files written years ago and some new development in ASP.NET (VB.NET).
How can I get past this error message as it tries to go to /TestWeb/default.asp? -
Server Error in '/TestWeb' Application.
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /TestWeb/default.asp
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Things I have checked and previously encountered trying to get this mess working:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config
(has nothing for *.asp nor
HttpForbiddenHandler so nothing to
comment out).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
(has nothing for *.asp)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config
(had a HTTPForbiddenHandler for
*.asp but I commented it out as per other postings advice; seemed to
have no effect for me though).
To get past an earlier error
("Request for the permission of type
'System.Web.AspNetHostingPermission'
failed"), I had to go to
"Administrative Tools > MS .Net
Framework 2.0 Configuration > My
Computer> Runtime Security Policy >
change Local Intranet to Full Trust.
To get past an earlier error ("the
network bios command limit has been
reached") I had to "enable a hot
fix" by adding the following DWORD
value at the following registry key:
HKLM\Software\Microsoft\ASP.NET\FCNMode
and set the value to 1 (per MS KB
Article 911272).
This whole web has been placed on a file server in our LAN and from my desktop VStudio2005 views it via the mapped drive letter (e.g. V:\SVNwork\myFolder\TestWeb)
Visual Studio 2005 models this as a "web site" (not a "web application project").
The remainder of this post describes some background about why I am trying this:
We tend to recreate the web site on our dev PC's which run IIS 5.1 on Win XP. Movement of new stuff into production can be awkward using WinDiff and copying files as needed.
I'm trying to implement source control over this work. I've had a heck of a time trying to configure Visual SourceSafe 2005 and local IIS to work together smoothly (interestingly, I had pretty good luck putting "web application projects" under VSS2005 so I think it's related to the awkwardness of the ASP.NET 2.0 "site" model and VSS).
Anyway, I've moved a development version of this classic ASP and ASP.NET to a common file server in our LAN. Before placing this under Subversion control as a working copy of it's equivalent imported into a repository, I just want to make sure it can work with the Cassini web server. That's where I am stuck. The ultimate goal is have this under SVN and view differences with TortoiseSVN.
Thanks for reading this far...hopefully someone can get me past this error and then I can move forward with the SVN and TortoiseSVN work.
Cassini doesn't, as far as I can tell, support classic ASP. An alternative would be to run a local install of Apache (since you can't/won't use IIS) which will host ASP, but is probably asking for trouble.
See also: http://blogs.msdn.com/mikhailarkhipov/archive/2005/06/24/432308.aspx
You could also run local IIS, which will, of course, host both ASP.NET and classic ASP. Visual Studio can easily be configured to debug with a local IIS install.
Points for moving to subversion: we use the Microsoft stack (Visual Studio, ASP.NET, SQL Server) with subversion and it works very well.
Subversion comment
GRRR.. bosses are fun. The svn model is known as copy/modify/merge. The repository lives in a central location - probably your file server. Using the svn client - or a Visual Studio plugin like the excellent AnkhSVN - each developer gets a LOCAL working copy,makes their changes and performs a "commit" when they're done working on a file.
SVN takes care of making sure that developers don't overwrite each others changes, provides a facility for merging changes when someone has modified a file between when you got your last copy and when you commit your changes, etc.
The whole point of a working copy is that it isolates developers from each other. The merge/commit step takes care of intergrating everyones changes. Having a central working copy that everyone works from defeats the purpose.
This is a very different approach than that used by Visual SourceSafe, which is basically a file locking mechanism. The fact that SVN is a real client-server application (where VSS is simply a disk-based "database" with no server app to administer it) provides all sorts of capabilities. We check out, modify, commit, then publish from svn to a dev server.
Also, if I remember correctly, Cassini won't server apps from a mapped drive.

How do I use ASP.NET with Visual Studio 2008

I haven't used Visual Studio since VB 3 and am trying to give it a shot with ASP.NET. It seems that it should be able to connect to a website (via some sort of ftp like protocol I figure) and allow to edit without having to manually upload/download the files. Is this the way it is supposed to work or am I mis-understanding? I have tried using 'create new website' and 'open website' using my testing domain (hosted by godaddy, wondering if that may be the issue as well), each time it gives me errors. I'm not sure if I'm doing something wrong or trying to do something it wasn't meant to.
You really don't want to be working directly on a live web site, do you? That's just crazy. One little mistake and you've hosed the site.
Visual Studio now has it's own built in web server. You use that for testing. If you really don't want to use that you can put IIS on your local machine or set up a Dev/QA server somewhere. In that case, you'd edit it via a file share.
You should be using some kind of source control. Even for a single developer it's very important. When finished with a programming session, you check your updates back into source control.
Finally, only after the site's gone through a suitable QA process, the production server is updated from source control, not from within visual studio.
I would develop your website locally and ftp it to your godaddy website after or use the publish website feature in VS

Resources