We are using our website on Windows server 2003 with IIS 6 and also have a test server 2003 with IIS 5.
When I tested the page with ViewState on test server, it worked fine. But we tested on other server which is running IIS 6.It gave error. I compared web configuratioin file, it looked the same. There was the machine key and maximum length for view state. I've been spending couple days and still don't find it. Somebody can help me.
This error doesn't happen all the time. So I think the source code is not the problem.
Here is my error
[SerializationException: Member '_name' was not found.]
System.Runtime.Serialization.SerializationInfo.GetElement(String name, Type& foundType) +7608149
System.Runtime.Serialization.SerializationInfo.GetString(String name) +24
SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2..ctor(SerializationInfo info, StreamingContext context) +69
PV.Data.Standard.EntityClasses.ClinicEntity..ctor(SerializationInfo info, StreamingContext context) +26
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context) +0
System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context) +108
System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context) +273
System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder) +49
System.Runtime.Serialization.ObjectManager.DoFixups() +223
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +188
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +203
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) +12
System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +968
System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +291
System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +392
System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +404
System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +392
System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +135
[ArgumentException: The serialized data is invalid.]
System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +199
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +297
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +113
[ViewStateException: Invalid viewstate.
Client IP: 10.0.51.92
Port: 51267
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; BRI/1)
ViewState: /wEPDwUJODUyMDU5NzIxDxYOHgpQcmFjdGljZVBrKClYU3lzdGVtLkd1aWQsIG1zY29ybGliLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OSRlMzE4OTAzNy0xOWY3LWRmMTEtOGQwNC0wMDFlMGI2ZTE4MWEeCENsaW5pY1BrKCsEJGQyYzg3OWI4LTE5ZjctZGYxMS04ZDA0LTAwMWUwYjZlMTgxYR4IUHJhY3RpY2UFBFBDTFAeBkNsaW5pYwUKVy4gUk9CSU5TTx4M..]
[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +106
System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +14
System.Web.UI.HiddenFieldPageStatePersister.Load() +217
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105
System.Web.UI.Page.LoadAllState() +43
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.clinicinfo_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9ca5f508\2be4cd8e\App_Web_sqt6xlmv.2.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
I guess it's too obvious to say that your test server might serve it's purpose better if it ran on the same version of windows and IIS that your production server uses... (so that's actually one suggestion...)
Otherwise, without digging into all of the possible issues that could be causing this, you can use IIS5 compatibility mode in IIS6.
R-click your website in IIS Manager
Service
check-mark the IIS 5 Isolation mode checkbox
Has the SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2 class ever had a member named _name? Is there load balancing involved here?
It looks like the ViewState was created on a machine where the SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2 class had a _name_ member, and then the ViewState is being interpreted on a machine where that class does not have a_name` member.
Related
I have a website hosted on shared server, running on .Net version : 4.0.30319.34280
I was initially getting the following error
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
In order to fix it I added a section in my web.config, by following the steps mentioned at : https://support.microsoft.com/en-us/kb/312906
Now I am getting the following error
Unable to validate data.
stack trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData) +1072
System.Web.UI.Page.EncryptString(String s, Purpose purpose) +150
System.Web.Handlers.AssemblyResourceLoader.FormatWebResourceUrl(String assemblyName, String resourceName, Int64 assemblyDate, Boolean htmlEncoded) +52
System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrlInternal(Assembly assembly, String resourceName, Boolean htmlEncoded, Boolean forSubstitution, IScriptManager scriptManager, Boolean enableCdn) +662
System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrl(Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn) +188
System.Web.UI.ClientScriptManager.GetWebResourceUrl(Page owner, Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn) +99
System.Web.UI.ClientScriptManager.RegisterClientScriptResource(Type type, String resourceName) +96
System.Web.UI.WebControls.BaseValidator.RegisterValidatorCommonScript() +212
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +85
System.Web.UI.Control.PreRenderRecursiveInternal() +88
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883
Any help in solving would be appreciated.
It could be that IIS recycled your app and therefore you get new keys for the session/view state. To alleviate this, add a machine static key in the web.config.
<machineKey
validationKey="56AB7132992003EE87F74AE4D9675D65EED8018D3528C0B8874905B51940DEAF6B85F1D922D19AB8F69781B2326A2F978A064708822FD8C54ED74CADF8592E17"
decryptionKey="A69D80B92A16DFE1698DFE86D4CED630FA56D7C1661C8D05744449889B88E8DC"
validation="SHA1" decryption="AES" />
Refrence Link
I have this code fragment
public Version BuildVersion =Version.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["BuildVersion"].ToString());
which reads following appSetting entry
<appSettings>
<add key="BuildVersion" value="4.7.2.2" />
</appSettings>
This throws exception
[FormatException: Input string was not in a correct format.]
System.VersionResult.SetFailure(ParseFailureKind failure, String argument) +10852983
System.Version.TryParseComponent(String component, String componentName, VersionResult& result, Int32& parsedComponent) +105
System.Version.TryParseVersion(String version, VersionResult& result) +135
System.Version.Parse(String input) +68
QuickPick.Main..ctor() in D:\IWROX-DEV\Expresslane\IWorx-Trunk-PromoFrontEnd\ExpressLane.Web\Main.Master.cs:52
ASP.main_master..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e43b3107\2f748eb6\App_Web_main.master.cdcab7d2.uaxqveln.0.cs:0
__ASP.FastObjectFactory_app_web_main_master_cdcab7d2_uaxqveln.Create_ASP_main_master() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e43b3107\2f748eb6\App_Web_main.master.cdcab7d2.uaxqveln.1.cs:0
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +30
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +782
System.Web.UI.Page.get_Master() +54
System.Web.UI.Page.ApplyMasterPage() +14
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335
once deployed to the server, However it runs fine on VS2010 web host (ASP NET Development Server).
Most likely the correct config file is not deployed to your host.
I have a ASP.net forms page that is acting as a proxy.
My website is downloading some content from another website, companyX.com.
companyX.com's site is using sharePoint.
My site is downloading the HTML from companyX.com and successfully adding it to my page, however, after Page_Init, Page_Load and Page_Unload but before Render my page is throwing the error pasted below.
My site does not have any sharepoint installed. However, it looks like there is something in asp.net that is processing the HTML content in my page, recognizing some sharepoint tags and then trying to load sharepoint. I would love to turn this off!
My page does have EnableViewState="false" EnableViewStateMac="false" ValidateRequest="false"
Error:
System.Web.HttpException (0x80004005): The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate.
Client IP: 127.0.0.1
Port: 55413
Referer: xxx/App.aspx?id=xxx
Path: /App.aspx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
ViewState: xxx... ---> System.ArgumentException: The serialized data is invalid. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at System.Web.UI.ObjectStateFormatter.DeserializeType(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream)
--- End of inner exception stack trace ---
at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
--- End of inner exception stack trace ---
at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.app_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
ASP.net isn't tying to load Sharepoint, it's trying to make sense of the ViewState contained in the page you are retrieving but cannot because it is built by another server with a different machine key et al.
I would personally remove the ViewState hidden field from the retrieved HTML prior to the Render stage, otherwise you might have ongoing issues that may confuse matters on a random basis.
I finally finally fixed it by adding the following to my page:
Protected Overrides Function LoadPageStateFromPersistenceMedium() As Object
Return Nothing
End Function
I have a web application that runs fine on a local dev server(the one that comes with ,net) but when uploaded to iis8 it comes up with a null exception. Not sure where to start.
The app is runing version 4 of the framework.
Value cannot be null.
Parameter name: type
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.ArgumentNullException: Value cannot be null.
Parameter name: type
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:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +10703382
System.Activator.CreateInstance(Type type) +6
System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean isAuthenticated) +77
System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated) +256
System.Web.HttpContext.get_Profile() +113
MB.ASTechnology.UI.BasePage.InitializeCulture() +36
ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) +91
ASP.default_aspx.FrameworkInitialize() +44
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +48
System.Web.UI.Page.ProcessRequest() +72
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +58
ASP.default_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
I am installing an application (BlogEngine) in a virtual directory under the main website, using SQL Server (MSSQLBlogProvider). BlogEngine has it's own database.
All worked, meaning I got the default page served from the SQL Database.
Then I used the ASP.net website administration tool\Security to create users (like shown in this video http://www.nyveldt.com/misc/BE13SQLMembership.html around the 7 minute mark. Very well explained and it's easy and fast to see what he is doing if you click around the timeline of the video)
After following those steps I get the error:
The EXECUTE permission was denied on the object 'aspnet_Roles_RoleExists', database 'Blog', schema 'dbo'. I to play around with the Access Rules but with no success.
Note that I am using "integrated security".
I'm not exactly shure whre to look and where to make modifications. Any help is hightly appreciated.
Stack Trace:
[SqlException (0x80131904): The EXECUTE permission was denied on the object 'aspnet_Roles_RoleExists', database 'Blog', schema 'dbo'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +388
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +688
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4403
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6665097
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite) +6667096
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +577
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) +735
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +290
System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +967
System.Web.Security.Roles.RoleExists(String roleName) +336
BlogEngine.Core.Right.InitRightForBlogInstance() in j:\Projects\BlogEngine_2_7_0_0\blogengine_4f5eed923a57\BlogEngine\BlogEngine.Core\Security\Right.cs:612
BlogEngine.Core.Right.get_RightsByRole() in j:\Projects\BlogEngine_2_7_0_0\blogengine_4f5eed923a57\BlogEngine\BlogEngine.Core\Security\Right.cs:600
BlogEngine.Core.Right.EnsureBlogInstanceDataLoaded() in j:\Projects\BlogEngine_2_7_0_0\blogengine_4f5eed923a57\BlogEngine\BlogEngine.Core\Security\Right.cs:566
BlogEngine.Core.Right..cctor() in j:\Projects\BlogEngine_2_7_0_0\blogengine_4f5eed923a57\BlogEngine\BlogEngine.Core\Security\Right.cs:113
[TypeInitializationException: The type initializer for 'BlogEngine.Core.Right' threw an exception.]
BlogEngine.Core.Right..ctor() in j:\Projects\BlogEngine_2_7_0_0\blogengine_4f5eed923a57\BlogEngine\BlogEngine.Core\Security\Right.cs:539
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +159
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
System.Activator.CreateInstance(Type type, Boolean nonPublic) +127
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +14376269
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +200
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +83
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +335
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601
Open Internet Information Services Manager
Check what Application Pool your IIS Website is using
Go to Application Pools
See what Identity your App Pool is running under
Open SQL Server Management Studio
Connect to your SQL Server instance
Open a New Query for your database
Run this SCRIPT:
GRANT SELECT, EXECUTE, UPDATE, INSERT ON SCHEMA :: dbo TO
[NT AUTHORITY\NETWORK SERVICE]
*Replace [NT AUTHORITY\NETWORK SERVICE] with whatever Identity your App Pool is running as.
Go back to IIS Manager
Recycle your App Pool
Browse to your website