How to check whether ASP.NET 4.0 registered on IIS 7.5 in C#
ASP4 App Pools automatically created
Can anyone tell me what process is used by ASP4 to automatically create the new App Pools for non-ASP4 AppPools currently on a server?
I have several Win2008 (Std-32bit) servers running IIS and various web sites that require ASP 1.1, 2/3, or 4. There is some process that keeps running against these servers (unknown at what interval right now) that keeps recreating the "ASP.NET v4.0 OldAppPoolName" pools and reassigning the sites to this new AppPool. My applications will not function correctly under these new AppPools.
This appears to be some automated process, or script, because I have seen a couple of my servers where "ASP.NET v4.0" is repeated 3 or 4 times in the name.
ASP.NET MVC 3 on IIS 7 (2008 R2)
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!
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?
IIS 7.5 domain application pool / machinename$ account
The situation is this, trying to setup a Windows 2008 server box running IIS 7.5 and setting the application pool for an ASP.NET application to run as a domain user account (service account). This is for access to things like the SQL databases and web services and how we currently have it successfully running on a Windows 2003 IIS 6 setup. I have it mostly working except for one thing. When an application hosted on the new IIS 7.5 calls an existing web service (on the old farm, same domain) it appears to pass the domain\machinename$ account as the credentials rather than the application pool as it did under the old setup. This results in a 401 unauhorized error because only our service account that the application pools are setup to run as have access to the web services. In the IIS logs for the web services I see all the requests come in with the domain\machinename$ rather than the expected domain\serviceaccount credentials.
The code that calls the web service is setting the credentials via:
ws.Credentials = System.Net.CredentialCache.DefaultCredentials
Same as it always had under IIS 6. I also noticed that if I remove the setting of credentials or manually construct them with a username/password it makes no difference. It still shows the request as coming from domain\machinename$.
In researching the problem I read that the IIS 7 virtual ApplicationPoolIdentity behaves sorta this way, using the machinename$ account for access to network resources but I don't know why I am seeing the same behavior when I am not using that account but a custom domain account.
Also, if I remove the web service calls I noticed that calls to the SQL database appear to be going thru correctly by using the application pool domain account credentials.
Also in research I found the applicationHost.config 'useAppPoolCredentials' setting but that appeared to not make any difference.
This site is setup for windows authentication only with the custom domain application pool. Other than that nothing special going on. Any idea on what is happening here and how I can get it to work as it did under IIS 6 where the application pool identity credentials would be used for the web service call?
IIS 7.5 Pass Through Authorization Not Working
The compiler failed with error code -1073741502
Hi experts,
I have Windows Server 2008 R2 system having IIS 7, as the live/production server.
After deploying my ASP.NET 2.0 application, when i try opening the website, i get this error message.
The compiler failed with error code -1073741502
and following as the detailed compiler output :
C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\7020dd00\b2c98ed9_8679cb01\Microsoft.Practices.ObjectBuilder2.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\54d3726f\394c8dd9_8679cb01\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\d039991e\7e7c87d9_8679cb01\itextsharp.DLL" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\d497f5b7\eb8e6dd9_8679cb01\Interop.Microsoft.Office.Interop.Excel.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\76b162d5\e81d4ed9_8679cb01\HCSPortal.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\56507235\31ae62d9_8679cb01\Interop.Microsoft.Office.Core.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\6769415d\3c644ad9_8679cb01\AjaxControlToolkit.DLL" /R:"C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\App_Web_tm4c-di1.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\c2f86b70\042190d9_8679cb01\SyrinxCkEditor.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\dfdbebc1\b2b889d9_8679cb01\Microsoft.Practices.EnterpriseLibrary.Common.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\c4a5ca41\76828bd9_8679cb01\Microsoft.Practices.EnterpriseLibrary.Data.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\9edec5fd\e836d686_900bcb01\Microsoft.Practices.Unity.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\assembly\dl3\4ec98a46\da074cd9_8679cb01\GMDatePicker.DLL" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\App_Web_createaccount.aspx.fdf7a39c.h_bi-1dk.dll" /D:DEBUG /debug+ /optimize- /win32res:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\aepkbeao.res" /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\App_Web_createaccount.aspx.fdf7a39c.h_bi-1dk.0.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hcsportal\3eebcb46\2e0459ed\App_Web_createaccount.aspx.fdf7a39c.h_bi-1dk.1.cs"
This website is working just fine on my local machine and also on test development server which has ( Windows Server 2003 and IIS 6.0 )
Any suggestions, what could be the issue here?
Many Thanks,
Vishal.
Execute system.diagnostics.process.start
How to update/sync the GAC Assembly across multiple IIS Web Front Ends
setting validation key
We are trying to solve the exact problem described in http://support.microsoft.com/kb/555353.
The article says that our servers "must have all the machineKey configurations set to the same validationKey." It goes on to say that "the key must be exactly 128 bits".
For information on how to properly construct the machineKey, I consulted http://msdn.microsoft.com/en-us/library/w8h3skw9%28v=vs.100%29.aspx. It says that "the length of the [validation] key depends on the hash algorithm that is used". The only one that is exactly 128 bits is "MD5 requires a 128-bit key (32 hexadecimal characters)."
So I created machineKey like this:
<machineKey decryption="Auto" decryptionKey="AutoGenerate, IsolateApps" validation="MD5" validationKey="A129872DF42BC11F0F76E095552F55EF" />
However, our web applications stopped working. This event is generated in the Application event log:
Log Name: Application
Source: ASP.NET 4.0.30319.0
Event ID: 1310
Task Category: Web Event
Level: Warning
Keywords: Classic
Description:
Event code: 3008
Event message: A configuration error has occurred.
Event ID: 2212e9ba6591469c8486900a1313c80e
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Machine validation key is invalid. It is '32' chars long. It should be either "AutoGenerate" or between 40 and 128 Hex chars long, and may be followed by ",IsolateApps". (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 285)
(I edited the text of the event to be concise. If you want more, I can send it.)
So the documentation says to make the validation key 128 bits long but .NET says that is doesn't like a 32-char key. Have I misunderstood the documentation?
Regards,
Cam
Forms authentication fails for every postback in a website which uses ARR to load balance
XML Parsing Error: no element found firefox iis 7.5 asp.net 4 published
I have a web application that was written with ASP.NET 4 C#. I published my app an moved it to my server(another computer). I have many sites that are working in my server with an application pool(.NET 2 and integrated) perfectly. I created an application pool(.NET 4& integrated) for my new site. I added ASP.NET 4 ISAPI and CGI restriction in IIS.
Now when I browse any pages of my new site I get this error in FireFox(XML Parsing Error: no element found location:.....) and this one in IE(HTTP 500 Internal Server Error...)
I don't have any problem with published site on my computer.(my computer is Win 7 and has IIS7 too)
Is there any setting that I forgot it?
Migrate to ASP.Net
Remote administer IIS 7.5 from Windows 7
Hello,
I am trying to remotely administer IIS 7.5 from a Windows 7 client and am having difficulties. I'm following http://www.iis.net/learn/manage/remote-administration/configuring-remote-administration-and-feature-delegation-in-iis-7 and have the server configured. I even have one PC configured and it is succesful in connecting. But, I can't connect to the server from a second PC. I've installed 'Internet Information Services > Web Management Tools > IIS Management Console' via the Turn Windows features on or off option in the Programs and Features, but this doesn't seem to be enough. Is there something else I am missing?
Thanks,
Mike
Active Server Pages error 'ASP 0126'
Hello Board,
I am a Systems Administrator (not for a company just work for a 3rd party company), and having an issue with an error that i receive on the server side when browsing his website from the server.
Error
Active Server Pages error 'ASP 0126'
Include file not found
/login.asp, line 3
The include file '/includes/connect.asp' was not found
I enabled parent paths in IIS 7 but it stills errors out. I am not a ASP guy at all, but all things in IIS looks ok. Is it his code? Anything he could try? Had a feeling doing research that it has something to do with his paths to his file?
Note: Just saw this. On the server that is working he has the path of this in IIS 7:
E:\sites\test1
On the one that is not working he has:
E:\sites\test1\updated
Path problem?
Thanks guys
IIS7 in integrated mode throws an ObjectDisposedException when trying to access the WindowsIdentity
I am trying to move a working application from IIS 6 to IIS7 integrated mode but I'm running into a bit of a problem that I cannot solve.
My app is based on windowsauthentication and I use this throughout my app.
In the app itself I'm using a self defined prinicpal that inherits from WindowsPrincipal like so:
MyWindowsPrincipal : WindowsPrincipal
MyWindowsPrincipal(WindowsIdentity Id) :base(Id)
{}
Now when I run this app in classic mode all is fine however when I switch to Integrated mode things go downhill.
I have a masterpage that tries to go into HttpContext.Current.User to obtain the users name. This fails with the following error:
Safe handle has been closed
Source = mscorlib, Type = System.ObjectDisposedException, Time = 1-4-2011 19:18:12
StackTrace of the exception =
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean success)
at Microsoft.Win32.Win32Native.GetTokenInformation(SafeTokenHandle TokenHandle, UInt32 TokenInformationClass, SafeLocalAllocHandle TokenInformation, UInt32 TokenInformationLength, UInt32 ReturnLength)
at System.Security.Principal.WindowsIdentity.GetTokenInformation(SafeTokenHandle tokenHandle, TokenInformationClass tokenInformationClass)
at System.Security.Principal.WindowsIdentity.get_User()
at System.Security.Principal.WindowsIdentity.GetName()
at System.Security.Principal.WindowsIdentity.get_Name()
at Rabobank.LIA.Pages.Sitemaster.OnInit(EventArgs e) in C:\Users\haanfc\Documents\Projects\RAD.LIA\Development\Source\WebApplication\Pages\LIA.Master.cs:line 43
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
For some reason the windowsIdentity is no longer available to me. How do I keep a reference to it, or, how do I get a new reference to it?
How to check whether ASP.NET 4.0 registered on IIS 7.5 in C#
ASP4 App Pools automatically created
Can anyone tell me what process is used by ASP4 to automatically create the new App Pools for non-ASP4 AppPools currently on a server?
I have several Win2008 (Std-32bit) servers running IIS and various web sites that require ASP 1.1, 2/3, or 4. There is some process that keeps running against these servers (unknown at what interval right now) that keeps recreating the "ASP.NET v4.0 OldAppPoolName" pools and reassigning the sites to this new AppPool. My applications will not function correctly under these new AppPools.
This appears to be some automated process, or script, because I have seen a couple of my servers where "ASP.NET v4.0" is repeated 3 or 4 times in the name.