Website Error each time rebuild and upload to Server : Attempted to read or write protected memory - access-violation

My Server:
Window Server 2008 R2
IIS 7.5
Each time I edit code locally then upload it to the server, it gets an error:
Event code: 3005 Event message: An unhandled exception has occurred. Event time: 7/4/2016 7:53:10 AM Event time (UTC): 7/4/2016 12:53:10 AM Event ID: d5bd5d3e12a14d1eabe43f91b5d3c7ef Event sequence: 721307 Event occurrence: 704 Event detail code: 0 Application information:
Application domain: /LM/W3SVC/30824/ROOT-4-131120555752900745
Trust level: Full
Application Virtual Path: /
Application Path: C:\vhosts\xxxxxxxxx\httpdocs\
Machine name: COLO1298 Process information:
Process ID: 6932
Process name: w3wp.exe
Account name: COLO1298\IWAM_plesk(default) Exception information:
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Request information:
Request URL: http://xxxxxxxxx.com.vn/publish/form/RegisterForm.aspx
Request path: /publish/form/RegisterForm.aspx
User host address: 171.254.38.251
User:
Is authenticated: False
Authentication Type:
Thread account name: COLO1298\IWAM_plesk(default) Thread information:
Thread ID: 55
Thread account name: COLO1298\IWAM_plesk(default)
Is impersonating: False
Stack trace:
at Microsoft.Win32.NativeMethods.CreateProcess(String lpApplicationName, StringBuilder lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, Boolean bInheritHandles, Int32 dwCreationFlags, IntPtr lpEnvironment, String lpCurrentDirectory, STARTUPINFO lpStartupInfo, PROCESS_INFORMATION lpProcessInformation)
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames)
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
When I restart IIS, it's OK again.
I don't think the source code has a problem because when I upload it to another server, this doesn't happen.

Related

Downloading Clickonce application fails in WebBrowser control

I am using webbrowser Control in my application and conditionally needs to download another application ( click once based) without user interaction. the download of the application works from Edge browser as expected.
Download fails in webbrowser control with following error
OPERATION PROGRESS STATUS
* [3/4/2022 3:58:28 PM] : Activation of C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce[1].application has started.
* [3/4/2022 3:58:29 PM] : Processing of deployment manifest has successfully completed.
* [3/4/2022 3:58:29 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [3/4/2022 3:58:29 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file:///C:/Users/Test4/AppData/Local/Microsoft/Windows/INetCache/IE/2XZDUQN2/TestClickonce.exe.manifest did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Inner Exception ---
System.IO.FileNotFoundException
- Could not find file 'C:\Users\Test4\AppData\Local\Microsoft\Windows\INetCache\IE\2XZDUQN2\TestClickonce.exe.manifest'.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

VB.Net Application Download did not succeed

I've encountered an error upon deploying a project for a few times. on my 18th revision of the project I noticed that it is not installing automatically after I opened my application. I tried to manually install it by running my system.application file but unfortunately I'm receiving a "Application Download did not succeed".
I've searched the web and did try some of the solution for this problem but none of them worked. I'm using VS2015 in coding this.
PLATFORM VERSION INFO
Windows : 10.0.17134.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.7.3056.0 built by: NET472REL1
clr.dll : 4.7.3416.0 built by: NET472REL1LAST_B
dfdll.dll : 4.7.3056.0 built by: NET472REL1
dfshim.dll : 10.0.17134.1 (WinBuild.160101.0800)
SOURCES
Deployment url : file:///C:/KidsMonitoringSystem/Application%20Files/Kids%20Monitoring%20System_1_0_0_20/Kids%20Monitoring%20System.application
Deployment Provider url : file://users/Team%20Guilas/Desktop/Kids/Kids%20Monitoring%20System.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\KidsMonitoringSystem\Application Files\Kids Monitoring System_1_0_0_20\Kids Monitoring System.application resulted in exception. Following failure messages were detected:
+ Downloading file://users/Team Guilas/Desktop/Kids/Kids Monitoring System.application did not succeed.
+ The network path was not found.
+ The network path was not found.
+ The network path was not found.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [6/23/2019 12:50:20 AM] : Activation of C:\KidsMonitoringSystem\Application Files\Kids Monitoring System_1_0_0_20\Kids Monitoring System.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2019 12:50:23 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file://users/Team Guilas/Desktop/Kids/Kids Monitoring System.application did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- The network path was not found.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- The network path was not found.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Inner Exception ---
System.IO.IOException
- The network path was not found.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
The answer appears to be in the logged info you posted: your application is hosted on/published to a network location (smb file share?) and it has gone away:
Downloading file://users/Team Guilas/Desktop/Kids/Kids Monitoring System.application did not succeed.
The network path was not found.
Check your network connection, server availability, drive mappings etc and try again?

Access is denied IIS

Since yesterday I have this error in the IIS from my web site, and not be is the
happens, the site compiles well in VS2013 but when I upload it to the IIS get that
error took more than 2 years site running without problem.
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:
[Win32Exception (0x80004005): Access is denied]
[ExternalException (0x80004005): Cannot execute a program. The command
being executed was
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /noconfig
#"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\transiceberg\26691cf8\468c99a2\sxvljlta.cmdline".]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle
userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName, String trueCmdLine)
+3365 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle
userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName, String trueCmdLine)
+8591876 System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters
options, String compilerDirectory, String compilerExe, String
arguments, String& outputFile, Int32& nativeReturnValue, String
trueArgs) +331
Microsoft.VisualBasic.VBCodeGenerator.FromFileBatch(CompilerParameters
options, String[] fileNames) +875
System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters
options, String[] fileNames) +179
System.Web.Compilation.AssemblyBuilder.Compile() +12440424
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +303
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean
isPrecompiledApp) +12978145
System.Web.Compilation.BuildManager.CompileGlobalAsax() +50
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +665
[HttpException (0x80004005): Cannot execute a program. The command
being executed was
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /noconfig
#"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\transiceberg\26691cf8\468c99a2\sxvljlta.cmdline".]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+80 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
+1142 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +1193
[HttpException (0x80004005): Cannot execute a program. The command
being executed was
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /noconfig
#"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\transiceberg\26691cf8\468c99a2\sxvljlta.cmdline".]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12980692
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +12820285
It looks like certain rights have been revoked for the user. Try providing the user rights of an Admin.

Unable to find assembly 'NHibernate.Search

I am getting the following error intermittently on one of our build environments (not on my local machine) - ignore the NH version - I compiled the assembly form source. The app pool is then restarted in iis. I cannot find out where this is originating from. Any ideas?
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 2428
Exception: System.Runtime.Serialization.SerializationException
Message: Unable to find assembly 'NHibernate.Search, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
StackTrace: at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.AppDomain.Deserialize(Byte[] blob)
at System.AppDomain.UnmarshalObject(Byte[] blob)

OAuth Consumer request for token from ServiceProvider returns InternalServerError

I'm playing around with DevDefined.OAuth - an OAuth consumer and provider implementation for .Net http://code.google.com/p/devdefined-tools/wiki/OAuth and on launching the ExampleConsumerSite project after configuring the service endpoints on my IIS 7 web server, I'm receiving the following error:
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: Request for uri: http://localhost:8080/RequestToken.aspx?oauth_callback=oob&oauth_nonce=94efde0b-dd45-4cee-8253-7496cef0b877&oauth_consumer_key=key&oauth_signature_method=PLAINTEXT&oauth_timestamp=1252512419&oauth_version=1.0&oauth_token=&oauth_signature=secret%2526 failed.
status code: InternalServerError
An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Source Error:
[HttpException]: 'RequestToken' is not allowed here because it does not extend class 'System.Web.UI.Page'.
at System.Web.UI.TemplateParser.ProcessError(String message)
at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
[HttpParseException]: 'RequestToken' is not allowed here because it does not extend class 'System.Web.UI.Page'.
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
[HttpParseException]: 'RequestToken' is not allowed here because it does not extend class 'System.Web.UI.Page'.
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseInternal()
at System.Web.UI.TemplateParser.Parse()
at System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath virtualPath)
at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I've noticed the oauth_token GET parameter is empty. On tracing this, the error source is from the line 12 of Default.aspx.cs page:
IToken requestToken = session.GetRequestToken();
protected void oauthRequest_Click(object sender, EventArgs e)
{
OAuthSession session = CreateSession();
IToken requestToken = session.GetRequestToken();
if (string.IsNullOrEmpty(requestToken.Token))
{
throw new Exception("The request token was null or empty");
}
Session[requestToken.Token] = requestToken;
string callBackUrl = "http://localhost:" + HttpContext.Current.Request.Url.Port + "/Callback.aspx";
string authorizationUrl = session.GetUserAuthorizationUrlForToken(requestToken, callBackUrl);
Response.Redirect(authorizationUrl, true);
}
While I'm not sure if this has to do with configuring the service endpoints but I'm running the consumer project from VS2008 and hosting the service on IIS. Please advice.
Working now. Error was due to the page RequestToken.aspx in the OAuthChannel not inheriting the correct class behind so when the consumer site was making a request for a token that resulted in an internal server error on the ServiceProvider side.