Problem running Worflow in an ASP.Net shared hosting environment  
Author Message
Tony Steele





PostPosted: Windows Workflow Foundation, Problem running Worflow in an ASP.Net shared hosting environment Top

I have just moved an ASP.Net workflow on to my shared hosting environment to try it out, but it seems that the WorkflowRuntime on start up is trying to access a registry key that it is not authorised too. Since it is a shared hoosting envronment (maximumasp.com) it is not an option to change access rights. See below, is there any way of disabling this behaviour:

Access to the registry key 'Global' is denied.

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.UnauthorizedAccessException: Access to the registry key 'Global' 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) 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 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.

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:

[UnauthorizedAccessException: Access to the registry key 'Global' is denied.]
Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) +2115699
Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity) +2778613
Microsoft.Win32.RegistryKey.GetValue(String name) +29
System.Diagnostics.PerformanceMonitor.GetData(String item) +96
System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item) +147
System.Diagnostics.PerformanceCounterLib.get_CategoryTable() +82
System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category) +65
System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName) +125
System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName) +9
System.Workflow.Runtime.PerformanceCounterManager.SetInstanceName(String instanceName) +199
System.Workflow.Runtime.WorkflowRuntime.StartRuntime() +612
NNet.Web.Global.Application_Start(Object sender, EventArgs e) in D:\Project\NNet-Init\Global.asax.cs:56


Software Development for Windows Vista19  
 
 
Jon Flanders





PostPosted: Windows Workflow Foundation, Problem running Worflow in an ASP.Net shared hosting environment Top

It maybe possible to change this behavior (I am not sure) - but I do know that WF must run in a Code-Access Security context that is full-trust. That probably will be your bigger problem in a hosted environment.

 
 
Tony Steele





PostPosted: Windows Workflow Foundation, Problem running Worflow in an ASP.Net shared hosting environment Top

wow, thats a bit restrictive, a lot of companies now run there internet web apps in a shared hosted environment.

Thanks for the quick response, luckely I have a dedicated server in the same hosted environment that I can use to run the workflows.

Tony