When I start Debugging on asp.net3.5 . Browser display bellow message
*Server Error in '/attn-web' Application.
HTTP Error 403 - Forbidden.
Version Information: ASP.NET Development Server 9.0.0.0*
It might be an issue with NTLM Authentication.
Right-click on your solution in the Solution Explorer.
Select Property Pages.
Select Start Options in the dialog.
In the Server section, uncheck NTLM Authentication
If you have Vista or Windows 7 try running the Visual Studio as administrator (right click the EXE and choose "Run as administrator") as it might be some security/permissions issue.
I was getting following issues, after trying their solutions i got this same error message
WCFTestClient The HTTP request is unauthorized with client authentication scheme 'Anonymous' (my service is a non-WCF service)
The HTTP request is unauthorized with client authentication scheme 'Ntlm'
and finally got the solution from here which is In the Server section, uncheck NTLM Authentication (Project Properties -> Web -> Servers)
Firewall,
bad 'hosts' file,
aspnet server configuration problem,
Folder security restrictions
..
Try to look at log files (Win+F, select folder /Windows and specify to find fresh files) and 'Event Viewer' (Press Win, then type: Event Viewer)
P.S.: Nothing personal, but your question is really unclear.
you just need to change the specific port you are using:
Right-click on your project in the Solution Explorer. Go to
Properties. Select Web in the dialog. Change the Specific port to
anything else e.g. 44444
hope this is the solution for your problem
It happened to me too. I had moved the project and fetched it again. It turns out that Visual Studio binds the virtual directory name as the source path for the files, and moving a (physical) directory makes IIS adjust the virtual directory to the new path. Visual Studio uses the virtual directory name still, and that causes a conflict.
Deleting in IIS the virtual directory made things work again.
I also had the same problem. This is how I solved it. I think this may be helpful for you.
1. Go to "start" and then type IIS(Internet Information Services) and hit Enter
2. In the right side there are "connections"
3. Go to "sites"-> "Default Web Site" which is located inside the connections
4. Double click the "Default website"
5. There in the features view double click the "Directory Browsing"
6. In the right side there are the actions if "Enable" is available double click on that (Otherwise that feature is all ready available)
7. Then go back to the previous page
8. Double click on "Default Document"
9. There you can see a list of default documents
10. If your default document for the website is not available you can add it by clicking the "add" in the right side and there type the name of your default document.
Related
I have a desktop application that makes a call to an asp page on the web server. The web server is currently returning a 500 server error and I cannot figure out how to get more detail.
There doesnt seem to be anything in the Event Viewer: Windows Logs->application.
Is there a setting I can make or another place I can find logs? Seems like this would be a typical issues but I cannot find any information on this.
(Also, the stack trace does not come through to the client application)
You can enable "trace logging" on IIS Manager. It fill create bunch of XML files you can easily investigate using IE installed on the server. (other browsers may fail to process xslt style files)
From Technet:
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see IIS 7.0: Open IIS Manager. For information about navigating to locations in the UI, see IIS 7.0: Navigation in IIS Manager.
In the Connections pane, click Sites.
In Features View, select the site for which you want to enable trace logging.
In the Actions pane, under ``Configure, click Failed Request Tracing.
In the Edit Web Site Failed Request Tracing Settings dialog box, select Enable to enable logging for this site.
In the Directory text box, type the path where you want to store the log files or click the browse button (...) to find a location on the computer. The default is %SystemDrive%\inetpub\logs\FailedReqLogFiles.
In the Maximum number of trace files text box, type the maximum number of trace log files that you want to keep, and then click OK.
PS: don't bother IIS 7.0, almost same as IIS 8.x
This should be a comment but comments don't let me add an image.
This is a screenshot of Matt Browne's comment. Upvote his comment if you find this helpful.
If you don't see the "Failed Request Tracing Rules" button, then you need to enable "Tracing" tracing in Server roles.
Here it is:
There is also this configuration that needs to be set:
I had to restart my machine in order for the server configuration to be recognized in IIS.
I have installed IIS on windows 7 home basic (http://www.iis.net/learn/install/installing-iis-7/installing-iis-on-windows-vista-and-windows-7).
Though some of the options were missing.....
after installation when I tried to access IIS, I got following error:
HTTP Error 404.4 - Not Found The resource you are looking for does not have a handler associated with it.
What do you mean you're accessing iis? Is it via a URL?
A 404 error means the server hasn't found the file it's looking for?
You may need to correctly configure a default page on the server (you may need to create a page 'default.htm', or 'default.aspx'
you'll need to try adding the IIS management console:
go to 'add/remove programs'
select 'turn windows features on or off'
click '+' next to 'Internet Information Services'
exp[and 'web management tools'
check 'iis management console'
this will install the console
try again, you may find that it works
locate the console (right click 'Computer' on the Start menu, select 'manage', under 'Services and Application', click 'Internet Information Services (IIS) manager
Under IIS, select 'Default Document'. This will show you what documents IIS is looking for.
Try creating a document at whatever location IIS is looking for (by default this is c:inetpub > wwwroot). IIS probably uses the default file 'iisstart.htm' that's in the wwwroot directory when you browse to http://localhost, but you can try
You may need to create a website in IIS first, using the management console that you've installed, and provide a default page. Creating and setting up a website is a whole topic in itself
I have a site running in IIS 7.5 that is accessed using a DNS alias different from the actual server name. In IE 8, integrated authentication is failing, but in Firefox and Chrome everything works fine. (IE presents a credential challenge a few times, then displays a 401.1 error page.)
I have figured out that this is due to IE using Kerberos (aka "Negotiate") over NTLM, and Kerberos requires registering a Service Principal Name (using SETSPN) so that the mismatch between the DNS name and the server name is properly handled.
My web site, however, doesn't need impersonation--it is enough to have delegation. So instead of messing with SetSPN, I would just like to remove "Negotiate" from the list of WindowsAuthentication methods in IIS.
I have searched for quite some time to find out how to do this in IIS. I have played with many appcmd commands--but I just can't find online examples, or figure out how by reading MSDN documentation or using appcmd /? to make appcmd commands apply only to a particular application within a site rather than to the entire web server. A few search-hours later over two days, and at least 3 dozen web pages visited, I am still coming up fruitless.
How in tarnation do I get this done--it seems like it should be so easy!
Open the Configuration Editor in IIS. It comes with IIS 7.5, or you can download the IIS administration pack for IIS 7.0. Navigate to the scope you want to affect (server, site, or application) and then open the icon:
.
Change the Section to system.webServer/security/authentication/windowsAuthentication:
Click on the providers item, and then click Edit Items on the right. Select the "Negotiate" item and click "Remove":
Close the dialog and click Apply in the Actions pane on the right.
Your problem is solved! No more Kerberos/negotiate!
Note: you can also click Generate Script in the actions pane to display the code that will make the change in either C#, javascript, or with appcmd from the command line.
For reference, here is the appcmd statement to do the job without using the Configuration Editor.
appcmd.exe set config "Virtual/path/to/application" -section:system.webServer/security/authentication/windowsAuthentication /-"providers.[value='Negotiate']" /commit:apphost
I've found out several topics related to this issue yet I couldn't find an answer which worked for my problem, which is following:
I moved my Asp.Net 4.0 site to a new server (IIS 7, Windows Server 2008). The server side is working fine but the CSS style sheet is not loading.
When I use firebug, I see the following on the part where css should be loaded
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Despite this message,I can display the content of the css (in text) on the web (such as ../Styles/button.css ..etc)
I have tried some solutions such as staticFile handler mapping on IIS or adding ASP roles on server manager (through control panel).
Any help would be appreciated
Kind regards
The articles/topics that you have found is talking about the same thing as Uali's answer, which is correct, but it doesn't always solve everyone's problem. The problem is also not about your css per se.
Before proceeding, make sure that you have enabled Static Content as the other answer instructed.
Then do these steps in the IIS Manager window with your virtual directory selected.
Open Handler Mappings.
Click Add Managed Handler in the Actions Panel located in the right.
In the request path field, type: *.css
In the type textbox, enter: System.Web.StaticFileHandler
In the name textbox, type in any descriptive name you want such as css fix.
Click OK.
Update:
I also forgot to say that you can do the same thing for .jpg, .png, .gif or any other file types if necessary.
Please Make sure Your IIS 'Static Content' is enabled.
Do to This follow these steps:
Open Control Panel
Click Programs
Click Turn windows features on or off in Programs and Features.
Open Internet Information services -> World Wide Web Service ->Common HTTP Features
Make sure Static Content is checked, Mark checked if it
is not.
Hopefully it will help you.
The process of enabling Static Content on Windows 7 is different from that on Windows Server 2008.
To install the Static Content feature on Windows Server 2008 and Windows Server 2008 R2, follow these steps:
a. Open Server Manager, and then expand Roles.
b. Right-click Web Server (IIS), and then click Add Role Services.
c. Under Web Server, click to select the "Static Content" check box.
d. Click Next to complete the installation.
Here is the complete step by step guide for both situation for reference.
http://support.microsoft.com/kb/2196177
So I have all the updated code, the entire solution builds. It works on everyone else's machine, however when I try and access localhost/extranet on my machine, it gives me this error:
HTTP Error 403.14 - Forbidden
Detail Error Info:
Module DirectoryListingModule
Notification ExecuteRequestHandler
Handler 0x00000000
Requested URL http://localhost:80/extranet/
Physical Path C:\svn\K2\trunk\appteam\web\Chatham.Web.UI.Extranet\
Logon Method Anonymous
Logon User Anonymous
Now I tried going into IIS7, and enabling directory browsing, this removed the error, but still didn't bring up my website. I also tried going in and disabling the default document, re-enabling it, everything, nothing worked. I've also restarted IIS a few times to no avail.
Any ideas?
It sounds like your IIS is not processing the routing rules for your application and is trying to find a default.aspx, index.htm, etc. Since it cannot, it is wanting to display the directory listings (which is why you were getting the 404.14).
I just checked my dev setup and I think that your AppPool has to be set on Integrated as opposed to Classic on the Managed Pipeline for the AppPool. I have ran into this before, there may be ways to use the Classic Pipeline, but this would/should be the quickest way to resolve your issue. To check/change the pipeline mode, click on Application Pools from the menu on the left side of IIS, find your AppPool and look in the managed pipeline column. If it is set to Classic -> Right click the AppPool, choose basic settings, then change the dropdown from Classic to Integrated.
If I am incorrect, someone please feel free to correct me on this in the comments.
Edit - Just to add, you can run an MVC app in the Classic Pipeline mode, but you have to do the IIS 6 tricks to get it to work properly. Mainly, you need to turn on wildcard script mapping for MVC to work in Classic mode, If not it expects an .aspx file (or similar) to exist for it to handle the execution pipeline over to .NET from IIS.
Causes this error is removed Global.asax file from your root directory of your site.
To solve this problem add a Global.asax file to your project.
See here: How to add Global.asax file to ASP.NET MVC4 project
In IIS, you need to find out which app pool your application is running from. Just right click the web application under Sites>Manage Web Site>Advanced Settings. The first property should be the app pool.
Now, click Application Pools. You should see a column called "Identity". Add that user to the ACL of the C:\svn\K2\trunk\appteam\web\Chatham.Web.UI.Extranet\ directory. If it just says 'ApplicationPoolIdentity', it can be a little tricky figuring out the user. If it's just running under DefaultAppPool, you can use IIS AppPool\DefaultAppPool.
My solution was because I didn't have ASP.NET installed via "Turn Windows Features on and Off" so it was simple. I figured it out by enabling directory browser and trying to go to my views folder which then gave a more descriptive answer and pretty much said that there was a problem with a module because ASP.NET is not properly installed. It then dawned on my to go and install it.
Change the 'start page' by right click on the page and select 'Set as Start Page' that you want to open first when the web application starts first. This might solve your problem. :)
Also make sure in IIS Application Pool settings that Enabled 32-bit Applications under Advanced Settings is set to FALSE. I spent hours trying to fix this and that was my issue. Windows Server 2012 IIS 8.5
I solved this problem by setting exact .net framework. My website was using v4.0 version of .net.
Workaround to handle the problem:
Open command line as an administrator
Go to directory "C:\Windows\Microsoft.NET\Framework\v4.0.30319"
Execute the following: aspnet_regiis.exe -i
Open IIS and change Pipeline Mode of Your application to Integrated
Hope this helps
In my case the HTTP Redirection feature was missing on the server (with IIS 10).
Adding the feature resolved the issue and the site started to load fine.