Specified method is not supported, iis 7.5 win 2008 r2 - iis-7.5

I ahve a code that was working just fine on iis7 windows 2008 32 bit but on iis7.5 i get below error every now and than. It looks like it is due to client disconnect but never had this error on old setup and there were client disconnect errors. It happens usually with simple post requests. I don't understand why system.drawing throws error. although some of those post requests are multi-part file/image uploads, most of them simple form posts.
Any one seen something like that?
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException: An error occurred while communicating with the remote host. The error code is 0x800703E3. ---> System.NotSupportedException: Specified method is not supported.
at System.Web.HttpResponseStream.get_Position()
at System.Drawing.UnsafeNativeMethods.ComStreamFromDataStream.Seek(Int64 offset, Int32 origin)
--- End of inner exception stack trace ---
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)
at System.Web.HttpRequest.GetEntireRawContent()
at System.Web.HttpRequest.FillInFormCollection()
at System.Web.HttpRequest.get_Form()
at System.Web.HttpRequest.get_HasForm()
at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
at System.Web.UI.Page.DeterminePostBackMode()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
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.ProcessRequest(HttpContext context)
at ASP.mobile_chat_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Related

Azure Search .Net SDK throws InvalidOperationException with SerializationBinder

I'm playing around with Azure Search .NET SDK on .NET Core (specifically, cloning the sample from Github - https://github.com/Azure-Samples/search-dotnet-getting-started)
When entering any operation with index (create, delete...) it throws an exception with SerializationBinder from Newtonsoft.Json like this
System.InvalidOperationException: Cannot get SerializationBinder because an ISerializationBinder was previously set. at Newtonsoft.Json.JsonSerializer.get_Binder()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Rest.Azure.JsonSerializerExtensions.WithoutConverter(JsonSerializer serializer, JsonConverter converterToExclude)
at Microsoft.Rest.Azure.CloudErrorJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings) at Microsoft.Azure.Search.IndexesOperations.<GetWithHttpMessagesAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Search.ExistsHelper.<ExistsFromGetResponse>d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Search.IndexesOperationsExtensions.<ExistsAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown --
I believe that's something wrong with the SDK itself as I cloned the public github repo. Is that right?
This was caused by a known compatibility issue that many Azure SDKs have with JSON.NET version 10. The details are here and here.
This was fixed in Microsoft.Azure.Search versions 3.0.5 and 4.0.2-preview.
I also can repro the issue you mentioned when I try to execute DeleteHotelsIndexIfExists function if the index is not existed.
Other actions such as Creating index,Uploading documents there are working correctly on my side.
After some investigation, I found that Microsoft.Extensions.Configuration.Json is preview version.
Please have a try to update to lastest stable 1.1.2 version. Then it works correctly on my side.

Orchard 1.8 CMS Meta Description and keyword (Vandelay Module 1.8) Installation Error

I am using Orchard 1.8 and I installed the "Vandelay Industries - Version: 1.8" module from the Gallery onto my development box (running an VS Orchard project) and enabled just the "Vandelay Meta" (it's all I need at the moment). I added the "Meta" part to the "Page" content type and all that worked fine. I as able to add both a "Description" and "Keywords" to pages.
When I did the module installation to my production server (our server) which is the same version of Orchard (it was set up from the dev copy a month or so ago), I am getting a message "Some features need to be upgraded: Vandelay.Industries" at the top of the Admin "Modules" - "Features" screen and there is a red box around the "Vandelay Meta" feature and there is also a "Upgrade" link next to the feature's "Disable" link. If I click it the page just refreshes and nothing changes.
The part is also not available for adding to the page content type.
The is also an error in the Orchard Log
2014-10-08 14:10:58,385 [13] Orchard.Exceptions.DefaultExceptionPolicy - Default - An unexpected exception was caught
...servername/Packaging/PackagingServices/InstallPackageDetails?packageId=Orchard.Module.Vandelay.Industries&version=1.8&sourceId=1&redirectUrl=%2FPackaging%2FGallery%2FModules
Orchard.OrchardCoreException: Unable to make room for file "C:\inetpub\A1_Website-OrchardCMS\App_Data\RecipeQueue\38a6aedb4c514ea1866be2138d14c99e\0" in "App_Data" folder ---> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\A1_Website-OrchardCMS\App_Data\RecipeQueue\38a6aedb4c514ea1866be2138d14c99e\0' is denied.
The App_Data and it's child folders has Read Execute Write permission IIS 7 IIS_IUSRS account.
There are also some errors "CREATE TABLE permission denied in database " i.e.
2014-10-08 14:12:19,332 [7] Orchard.Data.Migration.DataMigrationManager - Default - Error while running migration version 0 for Vandelay.Industries
../Admin/Modules/Features
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: CREATE TABLE permission denied in database 'Orchard_ProductionDB'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.RunPendingStatements()
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.Visit(CreateTableCommand command)
at Orchard.Data.Migration.Interpreters.AbstractDataMigrationInterpreter.Visit(ISchemaBuilderCommand command)
at Orchard.Data.Migration.Schema.SchemaBuilder.CreateTable(String name, Action1 table)
at Vandelay.Industries.MetaMigrations.Create()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Orchard.Data.Migration.DataMigrationManager.Update(String feature)
And the "Vandelay_Industries_MetaRecord" "Vandelay_Industries_SettingsRecord" are not in the production database (they are in the dev DB)
I have tried reinstalling the module and it does not fix it.
Any way to fix this? If so how?
Thanks in advance,
K.E.
Ensure the migration module is enabled before installing Vandelay_Industries_*, I found that to a be a cause as well.

NullreferenceException when opening SharePoint Document Library

After running the Configuration Wizard in SharePoint 2010 (had to do this because of permission issues) I cannot open any Document Library like "Pages". I receive the following Error:
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties() +134
Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PartitionIDs() +44
Microsoft.Office.Server.Administration.UserProfileApplicationProxy.IsAvailable(SPServiceContext serviceContext) +329
Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalAvailable() +44
Microsoft.Office.Server.WebControls.MyLinksRibbon.EnsureMySiteUrls() +60
Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalMySiteUrlAvailable() +15
Microsoft.Office.Server.WebControls.MyLinksRibbon.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +65
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427
A "normal" List can be opened without any problem. I alreade deactivated and re-activated "SharePoint Server Publishing" and "SharePoint Server Publishing Infrastructure"
Any idea?
It maybe has something to do with the User Profile Service Application.
look here:
http://www.codeproject.com/Articles/475253/Object-null-reference-error-when-opening-the-Site
According to this article, deleting the user profile service application fixes the error.

ArgumentOutOfRangeException in Azure from System.Web.HttpCachePolicy.UtcSetLastModified (DateTime utcDate)

A project that is deployed in Azure recently started throwing two or three of these exceptions a day. My investigation shows that this is often caused by assemblies that have future timestamps on them, generally caused by deploying to machines in other timezones (this was a good resource). We have not had this problem before in the year+ that the app has been live, and it receives a lot more traffic than the handful of exceptions would suggest.
I redeployed with remote desktop enabled and checked the timestamps of our dlls and the contents of the \Windows\Microsoft.NET and \Windows\assembly directories, and did not find any "future" timestamps. At this point I'm stuck, and would be grateful for ideas.
Stack Trace:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: utcDate
at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)
at System.Web.HttpCachePolicy.SetLastModified(DateTime date)
at System.Web.UI.Page.InitOutputCache(OutputCacheParameters cacheSettings)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.Mvc.OutputCacheAttribute.OnResultExecuting(ResultExecutingContext filterContext)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass27.b__24(IAsyncResult asyncResult)
at System.Web.Mvc.AsyncController.<>c__DisplayClass19.b__14(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
at System.Web.Mvc.AsyncController.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.b__4(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Timezone issues are really a headache in Azure Environment so I suggest you to add a startup task and change Azure Environment's timezone. I'm not claiming this will resolve your problem but it doesn't hurt to try does it? To change Timezone of your Azure Environment:
1) Save tzutil /s "Pacific Standard Time" as .cmd and include the file to your project.
2) In properties screen of the file, choose "Copy Always" as your Copy to Output option and "None" as your Build Action.
3) Add the following to your ServiceDefinition file:
<Startup>
<Task commandLine="nameOfFileYouCreated.cmd" executionContext="elevated" />
</Startup>
4) And of course adapt your DateTime references in your project, you don't have to deal with conversions etc.

Can add my custom webpart but then cannot modify any webpart on page

I`v made my webpart that works well (I can add it to page and use it). However if i want to move it to different zone or modify ANY other webpart on that page i get an exception.
Any ideas on what could be wrong?
Maybe it has to do something with that my web part has a null Zone variable? However webpart displays well on page. Details below.
Edit: Ahh, no, I see that other (original ones) web parts have Zone variable also as null. Anyway i have no idea how to even digg and find out the problem.
Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
Exception Details: Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
Stack Trace:
[WebPartPageUserException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))]
Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveSomeChanges(SPLayoutProperties layoutProperties) +897
Microsoft.SharePoint.WebPartPages.WebPart.SaveSomeChanges(SPLayoutProperties layoutProperties) +52
Microsoft.SharePoint.WebPartPages.SPWebPartManager.WPSaveSomeChanges(SPLayoutProperties layoutProperties) +83
Microsoft.SharePoint.WebPartPages.SPWebPartManager.ApplyChangeList(String changeString) +865
Microsoft.SharePoint.WebPartPages.SPWebPartManager.OnLoad(EventArgs e) +398
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Try if any of the below solution works
this or
this or
this
Here's some troubleshooting thoughts:
Check the SharePoint logs
As the exception doesn't help much, you could try checking the SharePoint logs and see if there are any other errors occurring at the same time that aren't reported to the UI. These might give some more detail.
Break debugger on any exceptions
If no luck, try disabling Just My Code in Tools / Options / Debugging. This will ensure your code breaks when errors occur outside of your web part. Then set Debug / Exceptions to check for all CLR exceptions so that any exceptions that occur in SharePoint will break at the error. Finally attach the Visual Studio debugger to w3wp.exe and access your page. Be aware that the debugger will break on any exception, even those that are not related to this problem. Hopefully this will give you a clue.
Comment code
If that doesn't help to narrow down the problem, I would start commenting out the web part code until the error no longer occurs. Then uncomment until you reach the precise line that causes the error. As the exception is in SaveChanges, it's something to do with persisting the web part properties. That's where I'd start commenting out first.

Resources