ASP.NET MVC 3 on IIS 7 (2008 R2)
windows authentication for site hosted on IIS server outside the domain
IIS 7 ASP.Net connection timeout
I have a rather odd issue that has just seemingly appeared out of nowhere:
We have a development application database server setup (win2003) which is hosting several instances of sql server (2000, 2005 & 2008).
We develop asp.net applications and I do so using vs2008 on win2008. Until yesterday this wasn't a problem but now when running an asp.net web application on my machine in iis7 connections to databases on the database server timeout.
However, if I run the exact same application using the vs2008 built in webserver it connects fine. I have created the most basic test possible:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string connectionString = "Data Source=my.dev.server;Initial Catalog=mydatabase;User Id=myuser;Password=mypassword;";
SqlConnection conn = new SqlConnection(connectionString);
this.txtLogOutput.Text += "opening";
conn.Open();
this.txtLogOutput.Text += "closing";
conn.Close();
}
}
Using IIS7 the above throws a connectionTimeout error on conn.Open() however using the built-in vs development server it works fine.
I've no idea where to go to look for a resolution to this???
Any help MUCH appreciated.
Dan
asp.net Causes Internal Error
We recently updated an application that was working on IIS 7 on a Windows 2008 R2 server to a newer version at now the application throws an error:
Server Error
The server was unable to process your request.
If we turn on the exteranl authentication isapi handler that was working before the update, we get the following error:
500: Server Error [10-0002]
Any ideas where to start?
Can't find system.web.configuration
Hello. I am trying to compile some code that uses system.web.configuration but vb.net does not recognize it. I get an underline under configuration. I got this code off of the net so someone had to be able to compile it. Any help greatly appreciated!
Need to find ISAPI for Win2008 IIS 7.5
I have an app that works on one Win2008 server, but not another. On the bad one, I get an error:
Handler "ExtensionlessUrl-ISAPI-4.0_32bit" has a bad module "IsapiModule" in its module list
when I look at Modules, I do not see IsapiModule in the list, although it is present on the server where the app works.
I imagine the problem has to do with how IIS was installed, but I can't figure out how to add it.
"Internet explore cannot display the web page
I have an asp.net application set up in test and production environments.
I built the prod server recently. Test server is working perfectly. The prod server has one aspx page that is not working.
Out of about 20 aspx pages they all work fine. Except for one aspx page that is saying "Internet explore cannot display the web page".
I have tried the following to diagnose and resolve the issue.
1. In IIS switch to context view and right click and browse on the page in question. The "Internet explore cannot display the web page" error is still displayed.
2. Restart IIS, this made no difference.
Has anyone got any idea's on how to diagnose and or resolve this issue? Any help would be much appreciated.
Thanks in advanced.
Application_Error not firing
We are trying to deploy a web application to Windows 2008 server with IIS 7 but are having trouble with error handling because Application_Error in global.asax does not appear to be firing. In our development server the same code is working as we intended.
For testing, we have reduced the code to:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("http://www.google.com")
End Sub
Web.config contains
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="error/error.aspx"/>
</system.web>
With this being the error handling code, throwing an error on the development machine takes you to google.com. On the production server it takes you to error.aspx. i.e. Application_Error does not appear to be firing. We have checked that global.asax is publishing correctly by updating the Session_Start to include a version number.
Help please, I'm totally stumped!
Unable to start debugging on the Web server IIS does not include a corresponding Web site URL starts
Hi to all I'm facing this problem when I try to start in debug from my Visual Studio 2012 my MVC4 application.
I've created a web site in my IIS with a correct binding. If I try to browse the application starting from IIS (using browse myapp.com on my ip local ip address) all works fine but when I press F5 from Visual Studio I got the following error message
Unable to start debugging on the Web server IIS does not include a corresponding Web site URL starts
I've configured the project in Visual Studio to run using local IIS specyfing as project url http://myapp.com so I can't understand the problem. Can someone help me to identify the error? Thank you in advance for your help.
Fabrizio
IIS Session timeout
Hi
I found there are few ways to configure IIS session timeout
1. via .NET code Session.TimeOut
2. IIS -> SessionState
3. Web.config
In fact, I usually use .NET application code to configure. But somehow user found that it doesn't work. It only work if configure via IIS->SessionState.
May I know what is the right way?
Thank you
SQL Server 2012 Connection String
Hi Folks
We recently upgraded to SQL Server 2012 and we are running IIS v7.5.
I was wondering if there are any clear improvements in terms of the provider declaration:
Our existing stuff (in the web.config):
<add name="MyConnectionString" connectionString="Data Source=10.0.2.7\MyInstance;Initial catalog=MyCatalog;Persist Security Info=True;User ID=MyUserID;Password=MyPassword;Pooling=True"providerName="System.Data.SqlClient"/>
What I've been testing with (in the web.config and haven't found any obvious/measureable improvement):
<add name="MyConnectionString" connectionString="Data Source=10.0.2.7\MyInstance;Initial catalog=MyCatalog;Persist Security Info=True;User ID=MyUserID;Password=MyPassword;provider=SQLNCLI11;Pooling=True"/>
Any insight or feedback?
thanks
rob
Framework 1.1 Patching in Windows 2008 R2
So I've followed the popular guide http://learn.iis.net/page.aspx/472/how-to-install-aspnet-11-with-iis7-on-vista-and-windows-2008/ on Windows 2008 R2 servers.
After I installed .NET 1.1 I checked Windows Updates and it found no patches were needed except for a KB974332 "to resolve issues with non-compatible applications for Windows 2008 R2". I manually installed the .NET 1.1 SP1 and checked for patches again, still nothing. I installed the ASP.NET security update that article described, and Windows Update still doesn't pick up any other needed patches.
I'm wondering if there are other patches out there that I should install as well, as I remember seeing a lot of .NET 1.1 patches over time. Is KB886903 really the only patch needed after .NET 1.1 SP1, or does someone have a comprehensive list of other patches that should be installed?
What also concerns me is if a new .NET 1.1 security update comes out but it's not released for Windows 2008 / R2 .... We will have to manually go back and install it, if we even notice.
RE: Re: A process serving application pool '[applicationpool name]' suffered a fatal communication error with the Windows Process Activation Service.
Hi,
I have windows 2008 r2 server, and it has 5 running web applications (framework 2), we have installed (framework 1) on the server to run an old application, and it worked, and then we found the have problems in our old applications (framework 2) on the same server, the applications pools getting recycling continuously and found the following error in the Event Viewer:
A process serving application pool '[applicationpool name]' suffered a fatal communication error with the Windows Process Activation Service. The process id was'6140'. The data field contains the error number.
Any idea??
aspnet_isapi.dll reported itself as unhealthy for the following reason: ‘Deadlock detected
We have migrated our visual studio 2003 applicaiton to visual studio 2012. After sending new application dll everuthing work fine, but when an existing ascx file is resent the web site become unresponsive and there is anything in the event log. The server has windows 2003 small business server with iis 6 installed. There is only an eventlog which says “ISAPI ‘d:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll’ reported itself as unhealthy for the following reason: ‘Deadlock detected’. We can not find any reason. Please suggest anything…
IE 10 Compatibility Type and Document Type
Hi Folks
I'm kind of stumped here with IE 10 (on RETAIL
Windows 8, the Windows 8 developer preview from September 2011 works fine in IE 10).
I keep getting a "Document Mode" of IE 7 in IE 10 on a RETAIL Windows 8 PC (once I hit the login.aspx page)
I've followed this strategy (to the letter):
http://msdn.microsoft.com/en-us/hh779632.aspx
The only thing I have left, which has a DocType declaration, are 3rd party vendor controls (i.e. Infragistics and FileVista), and these are buried deep in the site.
Any thoughts or experiences?
Thanks
Rob K
"Server Error in '/' Application" and "Cannot create ActiveX component"
Hi, I hope you can help me out with the above error we're getting on an in-house developed website that hat been running a couple of years an stopped. Code didn't change since 2010 so something on de server (IIS/ASP/dotNet) must have broken this...
The website runs on an IIS 7 64 bit server and in the Web.Config I have enabled the settings:
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
After this and some debugging properties I get the exact error on my client which is:
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error:
Line 6: Sub Page_Load(sender as Object, e As EventArgs)
Line 7: Dim EmailAddresses = New SortedListLine 8: Dim objGroup as Object = GetObject("LDAP://cn=some-group,ou=some-ou,.etc") Line 9: Dim strUser as String
Line 10: Dim strEmail |
Stack Trace:
[Exception: Cannot create ActiveX component.] Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class) +107 ASP.moveprinter_aspx.Page_Load(Object sender, EventArgs e) in G:\inetpub\wwwroot\Management\movePrinter.aspx:8 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207 |
Basically it doesn't matter if I really bind to a real group or just try to initialise the GetObject("LDAP://") interface, the error is the same, so the issue here is that due to some environment change this isn't allowed anymore.
I tried running the Application Pool as a user, admin, network service, all to no avail. Also changed the dotNet version to v4 without change. Same message.
Also loaded the same website on another
Does this ring a bell for someone? I've been debugging for some time now and it's getting kind of urgent that I fix it.
Many thanks in advance.
Accesses to virtual directory is denied to Network Service after adding custom module to system.webServer\modules section of ASP.NET Web application
Hi all,
I have one strange issue and hope you can help me.
I configuraed virtual directory to point to a remote folder with images. I used the below page to make it work appropriatelly:
http://serverfault.com/questions/279414/permissions-issue-with-virtual-directory-to-unc-path
I used a user that has full access to the remote folder for virtual directory(Basic Settings->Connect as->Specific User)
It works fine and I can get access to the images. But if I add my custom module to the system.webServer\modules section of my web.config file with the below code:
public class TestModule:IHttpModule
{
public void Dispose()
{
}
public void Init(HttpApplication context)
{
context.PostMapRequestHandler += new EventHandler(this.DummyMethodHandler);
}
private void DummyMethodHandler(object sender, EventArgs e)
{ }
}
I cannot get my images anymore. In Event Viewer I got this warning:
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 12/3/2012 6:27:48 PM
Event ID: 1310
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: WS-VNE
Description:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 12/3/2012 6:27:48 PM
Event time (UTC): 12/3/2012 4:27:48 PM
Event ID: e95aef2d3d3041a6a5e6cec89fefbd68
Event sequence: 4
Event occurrence: 3
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/22/ROOT-4-129990255712333235
Trust level: Full
Application Virtual Path: /
Application Path: D:\WorkingVersions\Website\
Machine name: WS-VNE
Process information:
Process ID: 6972
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: ConfigurationErrorsException
Exception message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\mars\FileExchange\VNE\Images3\web.config' because access is denied. (\\mars\FileExchange\VNE\Images3\web.config)
Request information:
Request URL: http://Website/images/rocks.jpg
Request path: /images/rocks.jpg
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 13
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
It's strange because I just subscribed an empty method to the HttpAplication events.
Thanks in advance!
customerrors and 404
I'm using ASP.NET 4.0 web forms with cutomerrors. I have
<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error.aspx" />
no custom routing. the the above config and my Error.aspx page. Seems to work fine for exceptions but 404s still give me the generic error page. I don't need to configure an error node under customErrors to direct 404s to the same Error.aspx page do I? I want all exceptions and 404s (and other Http errors too) to go to Error.aspx.
How do I set up my web.config so all errors including 404 go to my custom error page?
Question about pushing Application/Database live
I have a Windows 7 desktop with Visual Studio 2012 installed. I've developed a simple application on this machine that uses LINQ for CRUD operations into a database. The connection string looks as follows:
<connectionStrings><add name="MusicDatabaseConnectionString" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\MusicDatabase.mdf;Integrated Security=SSPI;" providerName="System.Data.SqlClient" /></connectionStrings>
The web server I want to host on is a Windows Server 2008 first revision with service pack 2, so I'm unable to get Visual Studio 2012 installed. (Apparently I need Revision 2). I've also installed LocalDb files using Web PI.
I have the application on the server and when I load it up using Visual Studio as the web server software, the application loads fine and everything works.
However, when I cofigure the site as an application in IIS and browse to the site through IIS I get IE's error message "Cannot display the web page".
Browsing to the site from my desktop and using Chrome gives "500 - Internal server error"
I turned CustomErrors to RemoteOnly, Off, and On but I can't get any more detailed infomration as to what my error could be. In my head it has to be an IIS problem because the site works just fine through Visual Studio 2010's web server software but I'm not sure how to fix this.
Network Service and IIS_IUSRS have proper NTFS permissions on the directory.
Any suggestions please? Thank you!
Possible values for Site.State (Microsoft.Web.Administration)
I am creating a tool using Microsoft.Web.Administration.
Is there a case that Site.State property will be set to ObjectState.Starting or ObjectState.Stopping?
Or may I know what are the only ObjectState values that will be returned when using Site.State property?
Operating Systems: Windows 7 and Windows Server 2008 R2
IIS Version: 7.5
Thank you very much.