I encountered an error that "authentication mode= windows" error . - asp.net

Error :
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
My error is above. How to solve this problem.

You need to configure the application in IIS.
IIS7 and IIS6 instructions: http://www.affiliatewiz.com/support/appstartpoint.asp
More complete IIS7 instructions: http://msdn.microsoft.com/en-us/library/bb763173.aspx
And more complete IIS5/IIS6 instructions: http://msdn.microsoft.com/en-us/library/zwk103ab.aspx
Technically this crosses the line between programmer and Server Admin duties, but as a .NET web developer, you do need to know that any web site or web app you create in Visual Studio needs to be set up as its own IIS Applicaiton on the web server it's deployed to.
There's a lot of good-to-know info here, particularly if you're doing it all on your own, or the server admins aren't familiar with the relationship between IIS apps and .NET web apps. http://msdn.microsoft.com/en-us/library/6hy1xzbw.aspx
(It's not all that uncommon for admins to not know what we need)

Either more the registration to the appropriate place or correctly configure your virtual directory as an application in IIS.

Related

Is there any way to see actual application error in a website hosted in IIS?

A legacy .Net webform application is hosted in IIS is running fine in old server having .Net framework 2.0 in it. I don't have source code of the application. I have just existing published DLL which i have copied from old server to a new server having .Net 4.7 framework by default and hosted it in new server's IIS.
While browsing the application, it is showing an default configured Error.aspx page which developers may have configured. So, in case of any error the application will navigate to Error.aspx page.
I am not able to figure out the actual .net error.
How can i get the actual error or is there any way to debug that ?
You can find errors in iis log (default path is %SystemDrive%\inetpub\logs\LogFiles).
Also you can enable detailed error message in browser. Link

Already deployed asp.net web application wont run in different machine

I am trying to run an already-deployed ASP.NET web application on a different machine, but I am getting a machine-to-application error. I am a beginner to ASP so please help me out with this.
This is the error which I get:
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
This is an error that is received when you deploy the application to a folder that is not marked as an application in IIS and you have a configuration setting that only works at the root application level. You don't have to do anything with the application, this should completely be an IIS setting. Right-click on the folder in IIS and select Convert to Application and choose the Application Pool appropriate for your application's framework version.
Turns out that the VS was complaining about a configuration section within the web.config file in the Backup folder application...just remove the backup folder so it doesn't have a web.config file under the Virtual directory that your ASP.NET application is running in.
Hope this will help you,
for more detail go through
http://forums.asp.net/t/1031775.aspx?Configuration+Error+allowDefinition+MachineToApplication+beyond+application+level

ASP.NET error log

Every time the ASP.NET application in question throws an error the Global.asax writes to an error file: logs\error.log. The ASP.NET applications works using Windows authentication.
I am able to write to the log file when debugging using Visual Studio, however it does not work when the application is deployed in the live environment. How do I find out what user account I need to give access to: logs/error.log?
The application is deployed on a Windows 2003 Server with IIS6. Microsoft.NET 3.5.
You would have to give the required permissions to the network service account. This link might be able to help you out.
Windows Server 2003 defaults to the "Network Service" account.
This can be verified by opening IIS (expand the computer if needed), expand the "Application Pools" folder, right click on the pool used by your web app, and go to the Identity tab.
FYI: Windows Server 2008 uses the IIS_IUSER instead of Network Services.
I hope that logs folder is a virtual directory setup outside the web site directory.
Otherwise every time you deploy the entire solution you will overwrite the logs folder and its content.
Microsoft has a tool for monitoring file access that can be useful for troubleshooting permission issues.
Process Monitor - http://technet.microsoft.com/en-us/sysinternals/bb896645
You will also want to check if your application is using windows authentication & identity impersonation since that can change the identity the application is executing with when enabled.

HTTP Error 403.14 in ASP.NET MVC2 application

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
This is my error... And I do NOT have IIS 7.0 installed locally. This is a remote host, which I pay for.
I found out how to fix this, but requires me to enter the IIS manager, which i can't.
Is there any way in Web.config I can tell the browser it should load up the default view or at least use the Routing table with the default route?
EDIT: Am I misunderstanding how to deploy an MVC2 project? It's not just copy the files or?
When I see this error on new servers at work it's usually because iis wasn't installed before .net was. You have to run the aspnet_regiis.exe -r on the server to register .net with iis...
I know this isn't what you want to hear but you should probably contact support of the hosting company and see if they can verify or not.
What version IIS are they running? What is your worker process setup to run? If its in classic mode, then you need a mapping from .mvc (or wildcard .) to aspnet_isapi. If its in integrated pipeline mode things should be a bit better. How did you deploy your MVC binaries? Put a test.aspx page in your app in the root folder - can you get to that?
So -
1. make sure your site works with an aspx file in it at the root
2. see what version iis your hoster is on and if they have setup anything for MVC if on iis6. If its IIS 7 ensure you are in integrated pipeline mode and not classic.

Deploy ASP.NET application in the same web site as Sharepoint

I am trying to deploy the Bugtracker.NET tool (http://ifdefined.com/bugtrackernet.html), which is a normal ASP.NET 2.0 application, into the default web site of an IIS which already has Sharepoint installed in it. The OS is Windows Server 2008 R2, IIS 7.5 and Sharepoint Services 3.0.
The question is that when I execute the application, I get a NullReferenceException because HttpContext.Current.Session is null, and I think that this could be due to a problem with the configuration of the web site, as the application runs perfect in web sites with no Sharepoint installed.
I already know that Sharepoint customizes the web site with handles, modules and so on, that all applications in the web site inherit, modifying their behavior. I have already given to the ASP.NET application Full trust level, enabled Anonymous authentication and InProc session state, but I am still getting that HttpContext.Current.Session is null. Even changing the app pool from Wss3AppPool to DefaultAppPool does not succeed.
Maybe someone could tell me which settings do I need to tweak in the web site in order to avoid this exception.
Many thanks in advance.
José Antonio Arroba
You need to look into Managed Paths and excluding the path to your bugtrackernet app.
However why do you HAVE to use the default web application?
Why not keep your life simple and setup a new IIS web application on a separate host header or subdomain and host your app there.
e.g.
http://bugtracker.yourdomain/
or just
http://bugtracker/

Resources