Random COMException on Web App "The handle is invalid" - windows-xp

All of a sudden, I am consistently getting a weird COMException on this machine when I try serve a web app with IIS. I never used to have any problems with this.
Stack Trace:
[COMException (0x80070006): The handle is invalid. (0x80070006 (E_HANDLE))]
[FileLoadException]
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +0
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
How can I fix this? I need this server to be working later today for a demo.
Things I have tried:
Stop/Start in IIS
aspnet_regiis -i
reboot

It is not actually a COM error, it is a Windows error, wrapped in a COM error code. It is a very low-level error, little can be distilled from the error code or the stack trace. There are plenty of hits when you Google the message, here's one that looks good. Be sure to find more yourself if that's not a good match.

Related

Xbox Live User Sign In Failed on Xbox One

I'm testing out the new Creator's Program Unity plugin, and when running the SignInAndProfile example scene on my local machine, it signs me in correctly. However, if I try to deploy it on my Xbox One, the development console gives me the following error:
Warning: unknown type TaskYieldInstruction`1[Microsoft.Xbox.Services.SignInResult] detected. Using reflection to gather its type information. Consider to reference it from your scripts so it can gathered during the build process.
(Filename: C:\buildslave\unity\build\Runtime/Scripting/Backend/DotNet/ScriptingTypeProvider_DotNet.cpp Line: 153)
Exception thrown: 'System.Exception' in Assembly-CSharp.dll
Exception: Sign in Failed. Status: UserInteractionRequired
at XboxLive.<SignInAsync>d__15.MoveNext()
at UnityEngine.SetupCoroutine.InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress)
at UnityEngine.SetupCoroutine.$Invoke1InvokeMoveNext(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: <Unknown> Line: 0)
I can't seem to find anything about what that status message means.
Thanks in advance.
If you're getting an error from RequestTokenSilentAsync, then you should try again with RequestTokenAsync which will bring up any resolution UI.
That said I want to ask first: have you switched your console to the right sandbox? I'm guessing this is likely your issue here.

Partition is below target replica or instance count

When attempting to publish a Service Fabric application to a local cluster, the cluster fails to load the application stating the error in the title. The stack trace points me to an exception line in OwinCommunicationListener.cs:
try
{
this.eventSource.LogInfo("Starting web server on " + this.listeningAddress);
this.webApp = WebApp.Start(this.listeningAddress, appBuilder => this.startup.Invoke(appBuilder));
this.eventSource.LogInfo("Listening on " + this.publishAddress);
return Task.FromResult(this.publishAddress);
}
catch (Exception ex)
{
var logString = $"Web server failed to open endpoint {endpointName}. {ex.ToString()}";
this.eventSource.LogFatal(logString);
this.StopWebServer();
throw ex; // points to this line from cluster manager
}
I am unable to inspect the exception thrown, but there is no useful exception information other than a TargetInvocationException with a stack trace to the line noted above. Why won't this application load on my local cluster?
It's hard to say without an actual exception message or stack trace but judging by the location from which the exception was thrown and the fact that the problem resolved itself the next morning, the most likely and most common cause of this is that the port you were trying to use to open the web listener was taken by some other process at the time, and the next morning the port was free again. This, by the way, isn't really specific to Service Fabric. You're just trying to open a socket on a port that was taken by someone else.
I'm honestly more curious about why you couldn't inspect the exception. I can think of three things off the top of my head to help with that:
Use "throw" instead of "throw ex" so you don't reset the stack trace.
Look at your logs. It looks like you're writing out an ETW event in your catch block. What did it say?
Use the Visual Studio debugger: Simply set a breakpoint in the catch block and start the application with debugging by pressing F5.

'sqlite3.dll was not loaded' when trying to install GitHub

I am trying to install GitHub using GitHubSetup.exe, downloaded from windows.github.com. The setup program 'downloads' what it needs, then closes and does nothing more.
Looking at TheLog.txt (in AppData/GitHub) shows the following:
2015-04-09 12:18:24.0747|ERROR|thread: 1|CrashManager|Dumping Loaded Module List
2015-04-09 12:18:24.0325|ERROR|thread: 1|CrashManager|Aieeeeeeee!
System.TypeInitializationException: The type initializer for 'NativeMethods' threw an exception. ---> System.Exception: sqlite3.dll was not loaded.
at SQLitePCL.SQLite3Provider.NativeMethods..cctor()
--- End of inner exception stack trace ---
at SQLitePCL.SQLite3Provider.NativeMethods.sqlite3_open_v2(Byte[] filename, IntPtr& db, Int32 flags, Byte[] vfs)
at SQLitePCL.SQLite3Provider.SQLitePCL.ISQLite3Provider.sqlite3_open_v2(String filename, IntPtr& db, Int32 flags, String vfs)
at Akavache.Sqlite3.Internal.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks)
at Akavache.Sqlite3.Internal.SQLiteConnection..ctor(String databasePath, Boolean storeDateTimeAsTicks)
at Akavache.Sqlite3.SQLitePersistentBlobCache..ctor(String databaseFile, IScheduler scheduler)
at GitHub.Helpers.SqlitePersistentBlobCacheFactory.CreateBlobCache(String path)
at GitHub.Helpers.SharedCache.<>c__DisplayClass5.<.ctor>b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at GitHub.Helpers.SharedCache.get_LocalMachine()
at GitHub.Helpers.AppLogManager.get_AnonymousIdentifier()
at GitHub.Helpers.HaystackTarget.Write(LogEventInfo logEvent)
at NLog.Targets.Target.Write(AsyncLogEventInfo logEvent)
2015-04-09 12:18:24.0747|ERROR|thread: 1|CrashManager|Inner Exception
System.Exception: sqlite3.dll was not loaded.
at SQLitePCL.SQLite3Provider.NativeMethods..cctor()
'sqlite3.dll was not loaded.' is also the error I get when I try to click on the GitHib shortcut that is placed on the desktop.
I am running Windows 8.1, 64 bit.
I have tried downloading a sqlite3.dll file and placing it in system32, but that does nothing. I have also explicitly told my firewall to allow connections for the setup program. I feel a little in over my head here - does anyone have any suggestions?
Please let me know if I need to provide any more information!
Thanks a lot!
Brendan here, one of the GitHub for Windows developers.
The latest update introduced a dependency that required a version of the Visual C++ Redistributable that wasn't installed as a pre-requisite. As a workaround, you can install the 32-bit version from here which adds it back in:
http://www.microsoft.com/en-us/download/details.aspx?id=30679

Error publishing an asp 3.5 app

Well, I'm here to ask about some problem I have, the detail is that when I publish the application from my computer to the server folder and after make the changes in IIS when I try to browse the web app I get the next error:
Index and length must refer to a location within the string.
Parameter name: length
In my local computer, I installed Visual Studio 2008 with SP1 and in the server is not installed only Framework 3.5.
Is the error related with Entity Framework or it's another problem?
Well, I hope you could help me... regards !
Stack Trace:
[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7495179
System.String.Substring(Int32 startIndex, Int32 length) +11
InnovaWebSite.Global.Session_Start(Object sender, EventArgs e) in C:\Users\cvelazquezt\Desktop\InnovaWeb\InnovaWebSite\Global.asax.cs:117
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +8783312
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +237
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +504
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
The error thrown is from a substring operation. Where it is actually being thrown, I have no clue, as you have not actually posted the stack trace on the error. This could be because you don't know how to do this?
If you can find the stack trace, or even detail your code that gets pieces of a string, you will have a better context of the exception and be able to start doing something to cure it.
As for root cause, the fact it is only happening after publish indicates a) something is missing on the server or b) the server is configured incorrectly (wrong version of .NET for the app pool for example) or c) you have not correctly published the site (maybe copied from your compiled application rather than published and moved the published version over, etc.???)

ClickOnce: DeploymentDownloadException: The operation has timed out

Symptom: ClickOnce installation starts and stops after around 600 kB (out of 2 MB).
Progress bar always stops at the same value (tried ten times).
Error log says that The operation has timed out (in inner exception) and fails with "DeploymentDownloadException (Unknown subtype)".
Error log details (irrelevant information trimmed):
ERROR DETAILS
Following errors were detected during this operation.
System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://fullpath/name.dll.deploy did not succeed.
- Source: System.Deployment
- Stack trace: at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(Downloa
dQueueItem next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
--- Inner Exception ---
System.Net.WebException
- The operation has timed out.
- Source: System
- Stack trace:
at System.Net.ConnectStream.Read(Byte[] buffer,
Int32 offset, Int32 size)
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(Downloa
dQueueItem next)
This only happens for two customers. The install works OK for thousands of others. I have found numerous posts via google with no answer or generic "firewall is the issue" or "customer was using dialup".
Has anyone solved this? Is this a ClickOnce bug?
Disabling firewall software on the machine did not help because a hardware firewall installed on the network was the cause (FortiGate 30B).
I doubt that it's a bug. However, it seems like it gets stuck at one file in the deployment path. Maybe it is a type of file that is blocked by a firewall.
I would just remove all files but one from the build and see if that gets downloaded ok, and then add the rest of the files one by one (or maybe type by type) and see at what file ClickOnce gets stuck downloading.
If that doesn't seem to do anything, I'd build a dummy app and deploy it with ClickOnce and see if it installs at all on the customer's box.