An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.dll ASP.NET - asp.net

This issue is making me crazy from past two days and I couldn't find any recursion is happening on this method and this issue happening recently, though none of the code has been changed, the following is my code
Calling the procedure:
Dim dssw As New Data.DataSet
dssw = RepSWSC()
The procedure:
Public Function RepSWSC() As Data.DataSet
Dim strConn As String = GetConnString()
Dim patient As String = String.Empty
Dim qid As String = String.Empty
patient = Session("patient")
qid = Session("qid")
Dim con As SqlConnection
If con Is Nothing Then
con = New SqlConnection(strConn)
End If
Try
Dim command As SqlCommand = New SqlCommand("spTestCall", con)
command.CommandType = Data.CommandType.StoredProcedure
Dim parameter As SqlParameter = command.Parameters.Add("#house_id", Data.SqlDbType.Int)
parameter.Value = patient
parameter = command.Parameters.Add("#q_id", Data.SqlDbType.Int)
parameter.Value = qid
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
Dim theDataAdapter As SqlDataAdapter = New SqlDataAdapter(command)
Dim ds As Data.DataSet = New Data.DataSet()
theDataAdapter.Fill(ds)
con.Close()
Return ds
Catch ex As Exception
Throw ex
Finally
con = Nothing
End Try
End Function
Stack Trace
BusinessAccessLayer.dll!BusinessAccessLayer.TestClass.RepSWSC() Line 17971 + 0xe bytes Basic
BusinessAccessLayer.dll!BusinessAccessLayer.TestClass.PopulateAnestRecordPDF(System.Data.DataRow dr, ceTe.DynamicPDF.Merger.MergeDocument objMergeDocument, String pdflabelname, Short BMI1, Short repanestcommentsdir, String CopyLabel, Boolean isRideHome, Boolean isNurseAssess, Boolean combineIDandDOS, Boolean allowoneproconly, Boolean showchiefc, Boolean showsurg, Boolean showsurglabel, Boolean specialTulane, Boolean showcmsinfo, Boolean checkCMSHotline, Boolean showEndo, Boolean showKGLB, Boolean trimaddallergies, Boolean showprecautions, Boolean showDiagTesting, Boolean trimAnestComp, Boolean HCALabel, String PageString, Boolean showMRN, Boolean alwaysShowChiefC, Boolean ridenameonly, Boolean showCultural, Boolean indentProcedure, Boolean showDOBSeparate, Boolean incDOSLabel, Boolean showPCP, Boolean NameLstFst, Boolean MergeAllergy, Boolean MidWestNursing, Boolean LastDoseLineForMeds, Boolean splitsurghist, Boolean PrinAnneSpecial, Boolean showMRNLabel, Boolean showCMSLabel, Boolean MergePsychtoNeuro, Boolean XNegHx, Boolean ShowSpecialists, Boolean XHaveMeds, Boolean TrimAllergies, Boolean expandWNL, Boolean xLatex, Boolean xHCP, Boolean showLang, Boolean NoMeds, Boolean NoAllergies, Boolean incEENT, Boolean ridephoneonly, Boolean LakelandAssess, Boolean indentTobacco, Boolean indentETOH, Boolean indentDrugs, Boolean flowallergies, Boolean showphones, Boolean xNoSurgs, Boolean xNoAnestComp, Boolean IncComboAlg, Boolean IncNameField, Boolean showmedlist, Boolean MakeAllergyList, Boolean showAMMeds, Boolean showReligion, Boolean showLongMSPONV, Boolean NoShowDx, Boolean showAgeonPatLab, Boolean showPatPhone, Boolean LatexUppercase, Boolean LakelandNoReactions, Boolean MGHBWSpecial, Boolean incDOBLabel, Boolean incDRLabel, Boolean isJerseyShoreNurse, Boolean showHCPno, Boolean showOtherLangX, Boolean checkPatLegalAge, Boolean isCommonwealth, Boolean MelbourneAlgIndent, Boolean MelbourneAnestCompIndent, Boolean combineIDDOSplus, Boolean NarrativeSurgeries, Boolean showPrimLangandSpkEng, Boolean RideRelationshipOnly, Boolean isMelbourneNurse, Boolean showAdvDir, Boolean showLeaveMsg, Boolean UseCondensedRideHome, Boolean showAdvDirX, Boolean showAnestCompBreakout, Boolean showMRSA, Boolean showHCPtext, Boolean showDocNameLastFirst, Boolean showSimpleLang, Boolean FlowMeds, Boolean isMtVernonEndo, Boolean showStaffUpdateName, Boolean showSpecialistsSeparated, Boolean showPCPSeparated, Boolean SNMSCIndent, Boolean showCaregiver, Boolean showSimpleProc, Boolean showBlackstoneAlg, Boolean showDentalBreakOut, Boolean showDOSmeds, Boolean showAge, Boolean indentProcedureMore, Boolean incSex, Boolean smallIndCombMedAlg, Boolean isSouthwest, Boolean DocContactAuth, Boolean isNSMCPhysical, Boolean showHCPName, Boolean showAdvDirName, Boolean isNorthPointe, Boolean isHSCC, Boolean MergeAnest, Boolean trimComboAllergies, Boolean isStLucie, Boolean isMasonRidge, Boolean showDiagTestingCombined, Boolean showInfDisease, Boolean isSWSC, Boolean MergeSubstance, Boolean isSummitView, Boolean showSummitViewInfections, Boolean TrimComboAlg, Boolean showPatAddress, Boolean showPatEmail, Boolean showPedsBMI, Boolean isOSE, Boolean showDOSSeparate, Boolean isMEE, Boolean showHosAddress, Boolean indentRoS, Boolean showCulturalX, Boolean showHxFalls, Boolean showSafety, Boolean showADHCPCombo, Boolean showFoodAllergy, Boolean showNonLabelDOBSeparate, Boolean showDiagTestingCombinedLineBreaks, Boolean SurgeryPerformedatFac, Boolean showBSA, Boolean ShowGreensboroAddAllergy, Boolean showFoodEnvironmentAlg, Boolean isUMAss, Boolean showNotifyPerson, Boolean isLosRoblesMC, Boolean isLakeside, Boolean isStJohns, Boolean showmalighyperX, Boolean isMusculoSC, Boolean AnestCompOneLine, Boolean showWarnings, Boolean showDentureX, Boolean showContactGlassX, Boolean isOSESurgeryPain, Boolean showExpSplitSurgList, Boolean showSTOPBANGScore, Boolean showOnlySurgPerfAtFac, Boolean ShowMedDoseFreqRoute, Boolean showPatientESig, Boolean showFamCancerHx, Boolean showHomeO2Use, Boolean showPONV, Boolean showAnestCompX, Boolean ShowCancerOnlyEndonly) Line 10361 + 0xe bytes Basic
UserInterfaceLayer.dll!UserInterfaceLayer.Reports_RepDisp.PatRep(Short repnum) Line 2334 + 0x1f0 bytes Basic
UserInterfaceLayer.dll!UserInterfaceLayer.Reports_RepDisp.PrintReport(Short repnum) Line 273 + 0x12 bytes Basic
UserInterfaceLayer.dll!UserInterfaceLayer.Reports_RepDisp.Page_Load(Object sender, System.EventArgs e) Line 33 + 0x13 bytes Basic
System.Web.dll!System.Web.UI.Control.OnLoad(System.EventArgs e) Line 2254 + 0x5d bytes C#
System.Web.dll!System.Web.UI.Control.LoadRecursive() Line 2274 C#
System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint) Line 4624 + 0xe bytes C#
System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint) Line 4296 C#
System.Web.dll!System.Web.UI.Page.ProcessRequest() Line 4265 + 0xf bytes C#
System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) Line 4235 + 0x7 bytes C#
System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) Line 4225 + 0x9 bytes C#
App_Web_ffa11ybr.dll!ASP.reports_repdisp_aspx.ProcessRequest(System.Web.HttpContext context) + 0x26 bytes
System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Line 3451 + 0xa bytes C#
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Line 2076 + 0x9 bytes C#
System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) Line 3783 + 0x20 bytes C#
System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) Line 1409 C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr) Line 1695 + 0x12 bytes C#
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) Line 2381 + 0xf bytes C#
System.Web.dll!System.Web.Hosting.ISAPIRuntime.ProcessRequest(System.IntPtr ecb, int iWRType) Line 169 C#
System.Web.dll!System.Web.Hosting.ISAPIRuntime.System.Web.Hosting.IISAPIRuntime2.ProcessRequest(System.IntPtr ecb, int iWRType) Line 207 + 0x9 bytes C#

Related

ReportExecutionService Fails on 2016

We copied an asp.net website from a 2008R2 Windows and SQL Server server to a Windows 2016 server with SQL Server 2016 and when we try to open the website from a browser it fails with the following error and stack trace.
Message: E:\shared\apps\RepairTrak\About.aspx.vb(19): error BC30002: Type 'ReportExecutionService' is not defined.
Stack Trace:
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, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Below is the entire code-behind page named About.aspx that is throwing the error.
Imports Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution
Partial Class About
Inherits Page
Private Sub About_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim virtualFolderPath As String = "~/Photos/_Rotated/"
'Get information about the files in the specified folder
Dim strPhysicalPath As String = Server.MapPath(virtualFolderPath)
strPhysicalPath &= "IMG_061749.JPG"
'Get information about the image
'Dim currentImage As System.Drawing.Image = System.Drawing.Image.FromFile(strPhysicalPath)
ImageRounded.ImageUrl = strPhysicalPath
ImageThumb.ImageUrl = strPhysicalPath
' ReportExecution object prepare
Dim rs As New ReportExecutionService()
End Sub
End Class
Turns out I had to install the ReportViewer runtime exe on the new server.

External Component Thew An Exception

I am having a very weird error on one of my websites. This error only happens on this particular website even though it uses a CMS that is being used by many others. This error also doesn't happen on my test machine, it only happens on the live server.
The error is as follows:
System.Web.HttpCompileException: External component has thrown an exception.
The stack trace is pretty generic:
System.Web.HttpParseException (0x80004005): External component has thrown an exception. ---> System.Web.HttpCompileException (0x80004005): External component has thrown an exception.
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, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile)
at System.Web.UI.PageParser.ProcessMainDirectiveAttribute(String deviceName, String name, String value, IDictionary parseData)
at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective)
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)
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.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, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
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)
One of the exceptions revealed a little bit more detail:
System.ComponentModel.Win32Exception: Access is denied
System.Web.HttpParseException (0x80004005): Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /noconfig /fullpaths #"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\196f56ec\d58fdc6d\2hgkxonl.cmdline". ---> System.Web.HttpParseException (0x80004005): Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /noconfig /fullpaths #"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\196f56ec\d58fdc6d\2hgkxonl.cmdline". ---> System.Runtime.InteropServices.ExternalException (0x80004005): Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /noconfig /fullpaths #"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\196f56ec\d58fdc6d\2hgkxonl.cmdline". ---> System.ComponentModel.Win32Exception (0x80004005): Access is denied
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, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile)
at System.Web.UI.PageParser.ProcessMainDirectiveAttribute(String deviceName, String name, String value, IDictionary parseData)
at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective)
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)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
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.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, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
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)
The YSOD also showed this:
Parser Error Message: Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /noconfig /fullpaths #"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\196f56ec\d58fdc6d\2hgkxonl.cmdline".
Does this mean that an Asp.Net exe file is denying requests from my website? This error is random too; sometimes it works and sometimes I get this. Any ideas?

SignalR HTTP 500 when calling server method from client

I'm just getting started with SignalR and have been able to broadcast messages out to all connected clients without any problems. I'd now like to have my client (javascript) join a group and receive only messages for that group. In my hub, I have the following method that adds connections to named groups:
public Task JoinGroup(string groupName)
{
return this.Groups.Add(Context.ConnectionId, groupName);
}
On the client, I have the following JS:
var latLonBounds = new google.maps.LatLngBounds();
var tripIdentifier = '#Model.TripIdentifier';
$(function () {
var hub = $.connection.locationHub;
hub.client.updateLocation = function (coordinates) {
// Implementation omitted
});
latLonBounds.extend(position);
map.fitBounds(latLonBounds);
};
$.connection.hub.logging = true;
$.connection.hub.start().done(function() {
hub.server.joinGroup(tripIdentifier);
});
});
When my page loads,in Chrome, I see an HTTP 500 for the following URL in the console:
http://localhost:49914/signalr/send?transport=serverSentEvents&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAA8OmZGDrRfEaOjaHahkkarwAAAAACAAAAAAAQZgAAAAEAACAAAADM78kCBInmZa7OROdPoXraiugBXLR5Xu3htxYC2JSnSAAAAAAOgAAAAAIAACAAAAAZwnPx6GMKOiw%2FivqQPlSfCb4WNP342YxvGyBpalmjSDAAAADljl1vg%2F7GYtD3R4AA2A9LXEnNZkyQVQjDUrW7ZVbvfPpWz1GCcOn6aw5yrkrWFrhAAAAAyX5otz0Xhx8tuIRgX2Pr1b9ZWFMvoairvqzns1%2FhjN%2BRhDIuAqAfonTbsZDjkdyDAZXzAKQqwTEKhpa5LYBhKg%3D%3D
In Visual Studio, I see the following stack trace:
SignalR exception thrown by Task: System.AggregateException: One or more errors occurred. ---> System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.AspNet.SignalR.Hubs.DefaultHubActivator.Create(HubDescriptor descriptor)
at Microsoft.AspNet.SignalR.Hubs.DefaultHubManager.ResolveHub(String hubName)
at Microsoft.AspNet.SignalR.Hubs.HubDispatcher.CreateHub(IRequest request, HubDescriptor descriptor, String connectionId, StateChangeTracker tracker, Boolean throwIfFailedToCreate)
at Microsoft.AspNet.SignalR.Hubs.HubDispatcher.OnReceived(IRequest request, String connectionId, String data)
at Microsoft.AspNet.SignalR.PersistentConnection.<>c__DisplayClassa.<>c__DisplayClassc.<ProcessRequest>b__7()
at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod(Func`1 func)
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.AspNet.SignalR.Hubs.DefaultHubActivator.Create(HubDescriptor descriptor)
at Microsoft.AspNet.SignalR.Hubs.DefaultHubManager.ResolveHub(String hubName)
at Microsoft.AspNet.SignalR.Hubs.HubDispatcher.CreateHub(IRequest request, HubDescriptor descriptor, String connectionId, StateChangeTracker tracker, Boolean throwIfFailedToCreate)
at Microsoft.AspNet.SignalR.Hubs.HubDispatcher.OnReceived(IRequest request, String connectionId, String data)
at Microsoft.AspNet.SignalR.PersistentConnection.<>c__DisplayClassa.<>c__DisplayClassc.<ProcessRequest>b__7()
at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod(Func`1 func)<---
If I remove the call to hub.server.joinGroup(tripIdentifier); from my JS, then I don't get the HTTP 500/exception so it seems like this line is the source of the exception.
Any suggestions as to what I can do to get group registration working would be much appreciated.
Thanks!
This is the part of the stack that tells you what's wrong:
---> (Inner Exception #0) System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.AspNet.SignalR.Hubs.DefaultHubActivator.Create(HubDescriptor descriptor
Basically what's that's saying is your hub class doesn't have a parameterless constructor. If you're trying to setup dependency injection for your hubs you appear to have an issue with registering your dependency resolver with SignalR. If you provide more details we can probably help you with getting that fixed as well.

What is the error in this connection string in vb.net?

I have the following connection string
<add name="portal_ConnSql" connectionString="Data Source=GFO-SQL03;Initial Catalog=PortalDB_V2;uid=Portal_Usr;Password=20!!P0rt#!" providerName="System.Data.SqlClient"/>
The code to get the Key :
Public Sub New()
connString = ConfigurationManager.ConnectionStrings("EPER_ConnSql").ToString()
conn = New SqlConnection(connString)
portalConnString = ConfigurationManager.ConnectionStrings("portal_ConnSql").ToString()
portalConn = New SqlConnection(portalConnString)
cmd = New SqlCommand
End Sub
Public Shared ReadOnly Property PortalConnectionStr() As String
Get
Return System.Configuration.ConfigurationManager.ConnectionStrings("portal_ConnSql").ConnectionString
End Get
End Property
I got the following error :
at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at util.getPortalRefelralCode(String referalCode) in E:\sites\EPER EN\App_Code\util.vb:line 280
at Test.Page_Load(Object sender, EventArgs e) in E:\sites\EPER EN\Test.aspx.vb:line 9
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Connection String of Membership is Problem

Connection String:
data source=mssql2008.chaiyohosting.com;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
Error:
Invalid value for key 'attachdbfilename'.
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.ArgumentException: Invalid value for key 'attachdbfilename'.
Source Error:
Line 20: protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
Line 21: {
Line 22: if (Membership.ValidateUser(Login1.UserName, Login1.Password))
Line 23: {
Line 24: e.Authenticated = true;
Source File: c:\inetpub\vhosts\vcantop.com\httpdocs\Default.aspx.cs Line: 22
Stack Trace:
[ArgumentException: Invalid value for key 'attachdbfilename'.]
System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +811400
System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2207
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +200
System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
System.Data.SqlClient.SqlConnection..ctor(String connectionString) +24
System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +54
[ArgumentException: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax.
Parameter name: connectionString]
System.Web.DataAccess.SqlConnectionHolder..ctor(String connectionString) +136
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +134
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +815
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +78
System.Web.Security.Membership.ValidateUser(String username, String password) +46
_Default.Login1_Authenticate(Object sender, AuthenticateEventArgs e) in c:\inetpub\vhosts\vcantop.com\httpdocs\Default.aspx.cs:22
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +108
System.Web.UI.WebControls.Login.AttemptLogin() +115
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
What's Wrong?
The error seems clear - the value you have for AttachDBFilename is invalid.
|DataDirectory| should be the physical path to the .mdf file:
c:\data dir\aspnetdb.mdf
All together:
data source=mssql2008.chaiyohosting.com;Integrated
Security=SSPI;AttachDBFilename=c:\data dir\aspnetdb.mdf;User Instance=true

Resources