Quantcast
Channel: ASP.NET Administration
Viewing all 589 articles
Browse latest View live

IIS7 32bit application does not fire error pages, only empty page

$
0
0

Hello, 

I'm configuring IIS7.5 on a new 64bit server to handle a older website that uses few 32bit components and a MS Access database.

I've set successfully the application pool to support the 32bit - so that Jet4.0 and the old components are working correctly.

However, IIS is working in a odd way: when the application pool is enabled with the 32bit flag, and an error occurs (I tried to induce a division by zero error, therefore a 500 error, and a 404 not found), it doesn't show any error page, but only a totally empty, blank page.  

If the 500 error happens, let's say, in the middle of the script execution, the scripts shows its output until the error occurs and then silently stops. The website is configured to use the default IIS error pages, so there is no custom setup for the error pages.

This strange behaviour does not take place if the application pool 32bit is disabled. In this case, everything works normally. 

I have made some searchs on google and I've seen that this problem was experienced by other persons but I could not find any solution yet.

Any clue? 


Orginal Url are written instead of User Friendly Url in log on IIS 7.5 when using Current.RewritePath.

$
0
0

Hai,

I want to get the User Friendly Url to be written on activity log of iis 7.5.But i always get the orginal url when using Current.RewritePath. It was working fine IIS 6.I tried using Current.Server.TransferRequest as per most of the replies i got from forums but i always get 500 error.I am using Integrated Pipeline mode and i have windows 2008 R2 server.I tried eanabling the 32 bit application true on iis 7.5 but still i get the same 500 error on using Current.Server.TransferRequest.I want to make the Current.Server.TransferRequest work on IIS 7.5 with  Integrated Pipeline mode,but it always give 500 error.Can Any body Guide me the right way..

Thanks in advance

how to enable http post in iis

$
0
0
Hello. I have an asp.net page that use HTTP POST with AJAX but this does not work if I call my site from: http:/My_ip/dir/Default.aspx bu if I call my site from: http://localhost/dir/Default.aspx. I need enble post fr IIS? And how can I do this?

Programmatically adding IIS Application Pool/Applications uses IIS Express rather than IIS

$
0
0

I have a Visual Basic application that creates an application pool and applications. Running it on a 64-bit Windows 8 machine results in the pool and applications getting created in IIS Express 8.0 rather than IIS 8.0. I have opened applicationhost.config in \documents\IISExpress and verified that the changes are being made there. I would appreciate any insight on how to target IIS rather than IIS Express. The configuration application will normally run on a web server but needs to work on a development machine as well. Here is the code to get the IIS Version:

Dim rootId As DirectoryEntry = GetDirectoryEntry(String.Format("IIS://{0}/W3SVC/Info", DomainName))

                If rootId IsNot Nothing Then
                    Try
                        If rootId.Properties.Contains("MajorIIsVersionNumber") = True Then
                            Dim iisVal As String = rootId.Properties("MajorIIsVersionNumber").Value.ToString

 

Using both localhost and machine name for the DomainName above connects it to IIS Express. Here is my function to create the application pool. The loop that sets the poolName variable is for debugging that helped determine it was using IIS Express. Again, it works but creates the pool in IIS Express.

Private Function GetOrCreateAppPool(ByRef mgr As ServerManager, ByVal domainPath As String, ByVal appPoolName As String, ByVal addAppPool As Boolean) As ApplicationPool
            ' First see if app pool exists
            Dim appPoolId As ApplicationPool = Nothing
            Dim poolId As ApplicationPool
            Dim poolName As String

            For Each poolId In mgr.ApplicationPools
                poolName = poolId.Name
            Next

            appPoolId = mgr.ApplicationPools(appPoolName)

            If appPoolId Is Nothing Then
                appPoolId = mgr.ApplicationPools.Add(appPoolName)

                If appPoolId IsNot Nothing Then
                    With appPoolId
                        .AutoStart = True
                        .ManagedPipelineMode = ManagedPipelineMode.Integrated
                        .ManagedRuntimeVersion = "v4.0"
                        .ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService
                        .ProcessModel.IdleTimeout = TimeSpan.FromMinutes(240)
                        .Recycling.PeriodicRestart.Time = TimeSpan.FromMinutes(0)
                        .Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("03:00:00"))
                    End With

                    mgr.CommitChanges()
                End If
            End If

            Return appPoolId
        End Function

 

Any assistance is appreciated.

Turn ASP.net on

$
0
0

I am trying to install ASP.net for IIS by using the Programs and Features, Turn Windows features on or off, Internet Information Services, World Wide Web Services, Application Development Features, and checking off ASP.NET and hitting OK. The program tries to install, but eventually fails and says, "An error has occurred. Not all of the features were successfully changed."

iis7.log shows this error:

[06/13/2013 16:03:35] [ ***** IIS 7.0 Component Based Setup ***** ]
[06/13/2013 16:03:35] "C:\Windows\System32\inetsrv\aspnetca.exe" /install /basic 2.0.50727.0
[06/13/2013 16:03:36] < !!FAIL!! > RegOpenKeyEx(HKLM\SYSTEM\CurrentControlSet\Services\ASP.NET_2.0.50727\Names) result=0x80070002
[06/13/2013 16:03:36] < !!FAIL!! > SetAccessToPerfCountersKeys() result=0x80070002
[06/13/2013 16:03:36] < !!FAIL!! > Installation failure, result=0x80070002
[06/13/2013 16:03:36] [ End of IIS 7.0 Component Based Setup ]

[06/13/2013 16:03:39] [ ***** IIS 7.0 Component Based Setup ***** ]
[06/13/2013 16:03:39] "C:\Windows\SysWOW64\inetsrv\aspnetca.exe" /install /basic 2.0.50727.0
[06/13/2013 16:03:39] < !!FAIL!! > RegOpenKeyEx(HKLM\SYSTEM\CurrentControlSet\Services\ASP.NET_2.0.50727\Names) result=0x80070002
[06/13/2013 16:03:39] < !!FAIL!! > SetAccessToPerfCountersKeys() result=0x80070002
[06/13/2013 16:03:39] < !!FAIL!! > Installation failure, result=0x80070002
[06/13/2013 16:03:39] [ End of IIS 7.0 Component Based Setup ]

Here are some of the programs that I have installed on that PC that might have something to do with the problem: 

Microsoft .NET Framework 4 Client Profile

Microsoft Visual C++ 2010 x86...

Please help. Thanks, 
Evan.  

Using IIS 7.5 as a local testing server

$
0
0

It's been more than 10 years since I last worked with IIS and VBscript so this IIS 7.5 is a totally different beast. Can someone help take me step by step in using it to test .asp pages which will be linked to a Microsoft Access database?

ps. I've already ensured that ASP and ASP. Net has been installed.

Crystal Reports App is returning "Access to report file denied. Another program may be using it."

$
0
0

I am in the process of migrating all of my webs from Windows Server 2003 running IIS 6 to Windows Server 2008R2 running IIS 7.5.  I have an Extranet site that has many subwebs (applications).  One of these applications is an app ceated in Visual Studio .NET 2008 using the embeded crystal reports.  (It works fine on my Windows 2003 server.)  The reports connect to an Oracle Database Server. 

I get the following error: 

Error in File C:\Windows\TEMP\temp_09e242b5-a913-44c0-9482-cda6ba347434 {E8899F5E-FF93-492F-AE83-6FA092EF452E}.rpt:
Access to report file denied. Another program may be using it.

"Network Service" and the account used for "Physical Path Credentials" on the IIS app has modify access to C:\Windows\Temp, the application folder, and the folder I'm trying to export the PDF's to.  All of these folders are on the local server but I am using a domain account.

I've tried enabling 32 bit applications on the IIS web site (I can't find where that is at right now but I know I did find it and tried that earlier.)  I also tried recompiling the app for 32 bit instead of any and redeployed.

So how do I make this work?

Application warmup vs widows app fabric autostart

$
0
0

what is the difference between warmup module (http://www.iis.net/download/applicationwarmup) and autostart functaionlaity provided by windows app fabric.

I am using WS 2008 R2 and need to host a wcf service, which will user azure service bus connectivity to connect to azure. this wcf service will be consumed by azure site, so i need that this service should be continusly up and registered with service bus.

Regards


The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove

$
0
0

Windows 2008 R2 Standard

IIS7.5

App Pool: . net 4.0

Published website www.test.local  works fine

Convert folder www.test.local/help into virtual application

 

I get an error when I browse www.test.local/help

 

 

Server Error in '/Help' Application.


The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.

             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.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
                  

Stack Trace:

[ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.]
   System.Web.Compilation.MultiTargetingUtil.ValidateCompilerVersionFor40AndAbove(String compilerVersion) +323
   System.Web.Compilation.MultiTargetingUtil.ValidateCompilerVersionFor40AndAbove() +17
   System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized() +204
   System.Web.Compilation.BuildManager.Initialize() +288
   System.Web.Compilation.BuildManager.InitializeBuildManager() +12732481
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +1030

[HttpException (0x80004005): The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601
                  

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

Help, pass base64binary data to server failed.

$
0
0

Hi Guys,

I need to upload a image binary data to server using a web service API generated from wsdl file. I read the byte[] from image file, and passed it to the web service API, then the API throwed an exception said "System.Web.Services.Protocols.SoapException: For input string: ' [here is the base64binary string for my image file] ' ". This issue draged me crazy, can anyone help me out?

Here is web service API define:

public BaseWSDto uploadImage([System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary", IsNullable=true)] byte[] imageByteArray) {

    object[] results = this.Invoke("uploadImage", new object[] {imageByteArray});

    rturn (BaseWSDto)results[0];

}

Here is how I call the API:

FileStream fs = new FileStream(imageFile, FileMode.Open, FileAccess.Read);

byte[] buffer = new byte[fs.Length];

fs.Read(buffer, 0, Convert.ToInt32(fs.Length));

BaseWSDto result = client.uploadImage(buffer);

Access denied - exception HRESULT 0x80070005 - for every asp.net application

$
0
0

Hi,

I'm having the following error when I try to run any of my asp.net applications:

System.UnauthorizedAccessException: Acceso denegado. (Excepción de HRESULT: 0x80070005 (E_ACCESSDENIED))

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0   

System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43   

System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127    System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity) +26

etc...

This is happening with every asp.net app in my development server, it doesn't matter if I run it from Visual Studio or from IIS. I think some permissions have been corrupted for the accounts used by IIS and/or ASP.NET and now I simply can't run any of them. The problem appeared after creating a new application pool and adding one app to this pool. The only "unusual" thing I did was to change the original identity of the pool from ApplicationPoolIdentity to NetworkService and back again to ApplicationPoolIdentity. I did this because the app couldn't load a dll.

Now I'd like to reset the accounts and permissions associated with IIS and ASP.NET but I don't know how.

I am working in Windows 7 Professional, SP1, 32 bits, Visual Studio 2010, Framework .NET 2.0.

Thanks in advance

Jose Carlos

 

 

 

Delete file issues

$
0
0

When I upload a file via an application to a folder on the server with the required permissions granted therefore I have no problem deleting it form the folder via the same application. However, when I manually rename or replace the same uploaded file directly within the same folder, then I receive a "ACCESS DENIED"  error as shown below when I try to delete  it usingFile.Delete(ServerPath) from the application:

What changes? I have granted  full access to the folder!

 

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\~\folder\58827.doc' is denied.ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating.  If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Default binding along with specified hostname bindings

$
0
0

Dear All,

I have two questions and would appreciate any suggestions:

First one:

Can anyone tell me how can I achieve the following:

I need to create HTTPs bindings with specified hostname and specific certificate to handle specific hostname requests. Also I need to have a default HTTPs binding that would handle all the rest non-specified hostname requests with a single default certificate.

I use Microsoft.Web.Administration for managing my bindings on the fly.

Second one:

Is it possible to add/remove bindings without application being restarted?

 

Thank you very much in advance.

How do you clear temporary files in an ASP.NET website project?

$
0
0

How do you clear temporary files in an ASP.NET website project?

I have been building and rebuilding an ASP.NET program.

I made the horrible mistake, I think, of recently copying the published content back to the folder I was developing.

So now I have an unusual error when I build the code. It says That there is a duplicate definition in one file in a temporary directory with anohter file in a temporary directory.

Error 3 The type 'ChildEventHandler' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files...\b90cc7a4\28d266b\assembly\dl3\c4cf1ea3\b6e4b808_ef7cce01\App_Code.DLL' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files...\b90cc7a4\28d266b\App_Code.asx5jp5d.dll' C:\inetpub\wwwroot...\Resources\usercontrols....ascx.cs 11 18 C:......\

I removed project and file names, of course, but this is basically what the error says.

Since the error is with temporary files, what should I do?

I do not see a "clear" option in visual studio to clear out the files of a compile.

 

 

Application errors. Logging

$
0
0

Hello all!

If I put the line

<customErrors mode="Off" />

into the section <system.web> of the file Web.config on my testing system, then I can read many errors of my application in my browser directly when I access some buggy page. I like this. On the production, I do not want to show those long technical pages of errors to my users. I am going to use the following line on the production:

<customErrors mode="RemoteOnly" redirectMode="ResponseRewrite" defaultRedirect="error.aspx"></customErrors>

But I want to know what errors occur! How can I redirect errors that I can see on my testing system in my browserto some log? A text log would be better but the Event log of Windows would be also not very bad.

Thank you if you answer.


DropDownlist Failed IIS 7

$
0
0
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true"
            onselectedindexchanged="DropDownList1_SelectedIndexChanged"><asp:ListItem Value="0">Disabled</asp:ListItem><asp:ListItem Value="1">Enabled</asp:ListItem></asp:DropDownList><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
protected void Page_Load(object sender, EventArgs e)
{

}

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
       Label1.Text = "DropdownList changed";
}

My project work on visual studio (localhost)
Failed to work on (Host) 

I see a lot of people have this problem.. like him ( http://forums.iis.net/t/1150606.aspx/1 )
Then i read this  http://www.asp.net/whitepapers/aspnet4/breaking-changes#0.1__Toc256770154

i still failed to work i try so many way to fix  but  still fail..
 

How can I upload a big file ? Asp.net 3.5 IIS 7

$
0
0

 I want to upload a big file about 300M,but it told me HTTP Error 404.13 - Not Found. Errorcode:0x00000000 

How can I do? 

IIS 8.0: ASP.NET 4.0+ (4.5) in Full trust on shared webhosting?

$
0
0

I'm not sure whether to post this question here or over there @asp.net. Nowadays more and more .NET website applications are unable to function in a (modified) medium trust .NET webhosting environment. Like some Umbraco extensions, Orchard CMS (since 1.6), other CMS-s, and so on.

I read something about changes to Security and Code Access Security in 4.0+:

does this mean we no longer have to set up a (modified) medium trust configuration file on .NET 4.0+ (4.5), on Windows Server 2012 / IIS 8.0? Eventhough I would prefer to do so...

Issue with Application Pools running under Managed Service Account Identities

$
0
0

Hi,

We recently went through a project where we upgraded the platform of our ASP.NET v2 applications from Windows 2003 IIS 6 to Windows 2008 R2 IIS 7.5 to take advantage of ADFS client authentication.  As part of the upgrade we decided to use the new Windows 2008 R2 Managed Service Accounts (MSA) as it seemed to provide account management advantages. Each of the 20+ applications is configured with a unique application pool and each application pool has been assigned a unique MSA as the identity. The ASPState database and the associated backend SQL 2000 database has been assigned rights to the appropriate Managed Service Account. Identity impersonation is set to false.

In general operation this has been working fine in Dev, Test and Production. However we hit a recent issue where the application pools failed to authenticate to the SQL database causing an outage. Unfortunately this immediately followed some scheduled patching maintenance so this threw me off the trail a little as to the cause. I have now identified that the issue is down to the automatic changing of the MSA password. I have taken the issue offline and can recreate the issue on demand by issuing a Powershell “Reset-ADServiceAccountPassword -Identity msaUniqueID”. Shortly after this has been run I see ASP.NET 2.0.50727.0 1309 warnings with  “Exception message: Failed to login to session state SQL server for user 'Domain\msaUniqueID '.”.  At this point the application fails and the only way to get it working again is to stop and then start the application pool. The application then works fine until the MSA password is changed again manually or automatically after 30 days.

I can’t find anything that suggests that we should not operate the application in this configuration or any obvious fix to the issue. Before we move to not using MSAs is there anything that can be done to resolve this?

Many Thanks

Tony

 

Missing ASP.NET section in Windows 7 Professional 64 bit

$
0
0

I am at a bit of a loss, and could use some help.  I am a developer, and am setting up a new development environment.  My old and new machine both have Windows 7 Professional, 64 bit.  On my new machine, I have enabled IIS.  I believe it is running IIS 7.5.  After setting up IIS, I open up IIS Manager, and browse to the default website.  Under the default website, there is normally an ASP.NET section.  It is there on my old machine, but my new machine doesn't have it.  The App Pool the website is assigned to is using .NET Framework 2.0.  I have changed it to use version 4.0, and I still don't see the ASP.NET section in IIS Manager.  I am not sure what I am doing wrong.

 I am going to try pasting a screen shot of my IIS Manager.  As you can see, under the areas there is no section for ASP.NET.  On my other machine there is.  My understanding is that there is a 32 bit version and a 64 bit version of IIS Manager.  I have tried running them both, and it doesn't make a difference.  I have tried turning on and off 32 bit support for the app pool, and it doesn't make the ASP.NET section show (my understanding is that this could make a difference in IIS 6).  Does anyone know what I am doing wrong?  Specifically I am trying to get to the ASP.NET section so I can get to the SMTP Email section so I can set up how email is delivered.  I was able to do this on my old machine, but can't on the new one because the whole section is missing.


Viewing all 589 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>