Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Wednesday, March 28, 2012

Very weird error. Ajax controls call default.aspx

I have a few pages in my site... and for some reason, if there's any ajax controls on the page, it calls default.aspx and runs the code every time any aspx page with an ajax control exists on it. Problem is, default.aspx resets my session variables.

Why does Ajax call the default.aspx page code? It only runs the CS file... it doesn't actually show the default.aspx page.

I doubt it calls it. Do you have a component in your site somewhere that's got a url of "/" attached to it somewhere, and that's invoking the default page?


it only seemed to only happen when I have Certain Ajax controls on the page. Note, it only does it with Internet Explorer 6 and 7. Firefox seems to be fine.

For example, I have a collapsible PAnel in each row of a Gridview. That is in an UpdatePanel. When the Gridview is populated (and I have a breakpoint on the default.aspx.cs file), it goes through that code. Well, I set my session variables on that page, so in essence it resets them.

It seems like it does this AFTER the page is loaded, because the labels that show content based on those session variables aren't updated until I go to a new page.

It only does this when I have a collapsible panel in IE. The panel is set to collapsed.


Actually, it appears that AJAX is clearing the Session Variables. I don't know where it's doing this, though.

Viewstate - Controls that are there but not there at the same time

Hi All,

I wonder if someone can help. I have just started using ajax and am converting an established application. It uses dynamically created controls to enter parameters for crystal. I have now got a panel that l holds the crystal component, and with testing of directly fed parameters this works fine. As soon as i try and use my dynamic componenets it can't see them. I have gathered this has got something to do with viewstates. I have seen several examples of how to fix this but they are all in C# and the application is in vb. Can anybody step me through this please as i sem to be missing something.

hello,

show me the examples that you found in C# ... i might be able to convert it back to VB for you ... =)


Ttry this online link for converting C# to VB Code...

http://www.kamalpatel.net/ConvertCSharp2VB.aspx


Hi

My conversion is below,

Protected Overrides Function LoadPageStateFromPersistenceMedium()As Object Dim viewStateAs String = Request.Form("__VSTATE")Dim bytesAs Byte() = Convert.FromBase64String(viewState) bytes = Decompress(bytes)Dim formatterAs LosFormatter =New LosFormatterReturn formatter.Deserialize(Convert.ToBase64String(bytes))End Function Protected Overrides Sub SavePageStateToPersistenceMedium(ByVal viewStateAs Object)Dim formatterAs LosFormatter =New LosFormatterDim writerAs StringWriter =New StringWriter() formatter.Serialize(writer, viewState)Dim viewStateStringAs String = writer.ToString()Dim bytesAs Byte() = Convert.FromBase64String(viewStateString) bytes = Compress(bytes) ScriptManager.RegisterHiddenField(Me,"__VSTATE", Convert.ToBase64String(bytes))End Sub
Public Function Compress(ByVal dataAs Byte())As Byte()Dim outputAs MemoryStream =New MemoryStreamDim gzipAs GZipStream =New GZipStream(output, CompressionMode.Compress,True) gzip.Write(data, 0, data.Length) gzip.Close()Return output.ToArray()End Function Public Function Decompress(ByVal dataAs Byte())As Byte()Dim inputAs MemoryStream =New MemoryStream() input.Write(data, 0, data.Length) input.Position = 0Dim gzipAs GZipStream =New GZipStream(input, CompressionMode.Decompress,True)Dim outputAs MemoryStream =New MemoryStream()Dim buffAs Byte()Dim readAs Integer = -1 read = gzip.Read(buff, 0, buff.Length)While (read > 0) output.Write(buff, 0, read) read = gzip.Read(buff, 0, buff.Length)End While gzip.Close()Return output.ToArray()End Function

And the original code was:

protected override object LoadPageStateFromPersistenceMedium()2 {3string viewState = Request.Form["__VSTATE"];4byte[] bytes = Convert.FromBase64String(viewState);5 bytes = Compressor.Decompress(bytes);6 LosFormatter formatter =new LosFormatter();7return formatter.Deserialize(Convert.ToBase64String(bytes));8 }9protected override void SavePageStateToPersistenceMedium(object viewState)10 {11 LosFormatter formatter =new LosFormatter();12 StringWriter writer =new StringWriter();13 formatter.Serialize(writer, viewState);14string viewStateString = writer.ToString();15byte[] bytes = Convert.FromBase64String(viewStateString);16 bytes = Compressor.Compress(bytes);17 ScriptManager.RegisterHiddenField(this.updVS,"__VSTATE", Convert.ToBase64String(bytes));18 }
thanks again

Saturday, March 24, 2012

want to disable button for the webmethod running time

Hi,

Iam using time-consuming webmethod and on the client page atlas:timecontrol for automatic refresh part of page. I want to disable button(whitch start the 5hours webmethod). The one way to disabling is using method in form tag:

onsubmit="DisableButtons()"
But this event is calling every (for example) 5 seconds of automatic refreshing of atlas:timecontrol.
Exist the way to disable button after click the start button and after ending this method button enable back? 
Thanks a lot. 

Hello,

The way to accomplish this is something like the following:

function onServiceComplete(result) {
var button = $get('myButtonElementId');
if (button) {
button.style.disabled = ''; // enable
}

// do stuff with result here...
}

function callService(stuff) {
var button = $get('myButtonElementId');
if (button) {
button.style.disabled = 'disabled'; // disable
}

var serviceParam = stuff;
MyServiceName.DoStuff(serviceParam, onServiceComplete, function(serviceErr) {
// be sure to re-enable when error occurs...
button.style.disabled = '';
var errorDiv = $get('myErrorDiv');
errorDiv.innerText = serviceErr.get_message();
});
}

I hope this helps.

WCF 3.5 ajax webservice compilation error

I had AJAX ScriptService, which I converted to WCF 3.5 webservice.

Everything works fine for some time, but after a while (maybe after session timeouts or IIS recycles process) it stops working, and I get this error in Event Log:

WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/19949373
Exception: System.ServiceModel.ServiceActivationException: The service '/ve/MapService.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'App_Web_nao50rcd, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.. --> System.IO.FileNotFoundException: Could not load file or assembly 'App_Web_nao50rcd, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'App_Web_nao50rcd, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
-- End of inner exception stack trace --
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
Process Name: w3wp
Process ID: 2480

Webservice is using sessions and the code is inside /App_Code/ folder.

Any suggestions?

I tried to disable ASP.Net compatibility mode (required for sessions) and then everything works fine for MUCH longer (maybe 8 hours?), but after a while i still get the same error.


Can you please show the WCF configuration as well as how you're registering the service in the webapp.


web.config:

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup>
</sectionGroup>
</sectionGroup>

<system.web>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
...
</system.web>

<compilation debug="true" defaultLanguage="c#">
<assemblies>
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
</compilation>

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>

<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>


<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="jsonBinding" maxReceivedMessageSize="655360" />
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="MapServiceAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata httpGetEnabled="true" httpGetUrl="" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="metadataSupport" name="MapService">
<endpoint address="" behaviorConfiguration="MapServiceAspNetAjaxBehavior"
binding="webHttpBinding" bindingConfiguration="jsonBinding" contract="MapService" />
</service>
</services>
</system.serviceModel>

MapService.svc:

<%@.ServiceHostLanguage="C#"Debug="true"Service="MapService"CodeBehind="~/App_Code/MapService.cs" %>

MapService.cs:

[ServiceContract(Namespace = "SCi", Name = "MapService")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class MapService { ... }


Also - same error happens when running on IIS or VS built-in ASP.Net Development Server...


do you find the problem?


I think the problem is related to IIS7 - cause seems like problem is happening only on my dev machines which are running Vista Ultimate 64 bit. Though few times it happened on Windows 2003 Server x32, but it does not happen all the time like on Vista.

Wednesday, March 21, 2012

Web Part moves only once with Ajax Update Panel RC1

I uset Web part with Update Panel RC1.

But only once DND possible.

Next time it is not available.....

Can anybody have solution for this.??

Try to specify post back through the triggers of the asp:UpdatePanel.
Here are some sample codes for your reference.
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="upPortal" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:WebPartManager ID="wpmPortal" runat="server" Personalization-Enabled="true">
</asp:WebPartManager>
<div class="wrapper">
<asp:CatalogZone ID="czPortal" runat="server">
</asp:CatalogZone>
</div>
<div class="wrapper">
<div id="wz1">
<asp:WebPartZone ID="WebPartZone2" runat="server" HeaderText="Column 1">
<ZoneTemplate>
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
<%--<uc1:ThemeSelector ID="ThemeSelector1" runat="server" EnableTheming="True" />--%>
</ZoneTemplate>
</asp:WebPartZone>
</div>
<div id="wz2">
<asp:WebPartZone ID="WebPartZone3" runat="server" HeaderText="Column 2">
<ZoneTemplate>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="Black"
DayNameFormat="Shortest" Font-Names="Times New Roman" Font-Size="10pt" ForeColor="Black"
Height="220px" NextPrevFormat="FullMonth" TitleFormat="Month" Width="312px">
<SelectedDayStyle BackColor="#CC3333" ForeColor="White" />
<TodayDayStyle BackColor="#CCCC99" />
<SelectorStyle BackColor="#CCCCCC" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt"
ForeColor="#333333" Width="1%" />
<DayStyle Width="14%" />
<OtherMonthDayStyle ForeColor="#999999" />
<NextPrevStyle Font-Size="8pt" ForeColor="White" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" ForeColor="#333333"
Height="10pt" />
<TitleStyle BackColor="Black" Font-Bold="True" Font-Size="13pt" ForeColor="White"
Height="14pt" Font-Names="Arial" />
</asp:Calendar>
</ZoneTemplate>
</asp:WebPartZone>
</div>
<div id="wz3">
<asp:WebPartZone ID="WebPartZone4" runat="server">
<ZoneTemplate>
<asp:Login ID="Login1" runat="server">
</asp:Login>
<asp:Login ID="Login2" runat="server">
</asp:Login>
</ZoneTemplate>
</asp:WebPartZone>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="czPortal" />
<asp:PostBackTrigger ControlID="WebPartZone2" />
<asp:PostBackTrigger ControlID="WebPartZone3" />
<asp:PostBackTrigger ControlID="WebPartZone4" />
</Triggers>
</asp:UpdatePanel>
</div
Wish the above can help you.

I tried this before only

But the problem is Page get refresh evrytime when u Drag & Drop the webparts.

then whts the use of UpdatePanel?

Give solution for this...

thnxSmile


If you want to drag&drop webparts, you should specify post back foy them.Otherwise they can't work in Ajax RC 1.0 inder asynchronous post back.I am not sure if ajax:DragPanelExtender is suitable to you.If yes,you can refer to the following sample codes.
<div>
<div style="width: 407px; height: 227px; background-image:url(images\airplane.bmp);background-repeat: no-repeat; border: 5px solid gray">
<table style="width: 250px;">
<tr>
<td style="font-family: Gill Sans MT; font-weight: bold; font-size: 12pt; padding-left: 5px;color: white; height: 41px;">? Room View<hr />
</td>
</tr>
<tr>
<td>
<asp:Panel ID="pnl" runat="server">
<div runat="server" id="headerdiv" style="width: 70px; height: 15px; display: block;
background-image: url(images/Graphics.gif); font-size: 7pt; color: Black; font-family: Arial;
text-align: right; padding-right: 5px; border: 1px solid black; cursor: move;
float: left; font-weight: bold; z-index: 200" onmouseover="showDiv()" onmouseout="hideDiv()">
...dragable
</div>
<br />
<div id="MainPicture" runat="server" style="width: 100px; height: 100px; overflow: visible;
background-color: inherit; cursor: move; vertical-align: middle; text-align: center;"
onmouseover="showDiv()" onmouseout="hideDiv()">
<img runat="server" id="picturemain" alt="room view" src="http://pics.10026.com/?src=images/Amazon.gif"
style="width: 250px; height: 150px; border-right: 5px solid black; border-bottom: 5px solid black;
border-top: 1px solid silver; border-left: 1px solid silver" />
</div>
</asp:Panel>
</td>
</tr>
</table>
</div>
<Ajax:DragPanelExtender ID="DragPanelExtender1" runat="server" DragHandleID="MainPicture" TargetControlID="pnl">
</Ajax:DragPanelExtender>
</div
Wish the above can help you.

thnx for replying...Smile

But I can't revert back now....

I have to wait for final release of MS Ajax

Thnx once againSmile


I have the same problem. It is pretty annoying, this was my first try with atlas. I saw demos with webparts without postback.

What is actually the problem? A broken atlas framework has been released?

Would the next version of Atlas fix this problem?

Would an older version of Atlas be useful and where to download it.

This topic is important!


Just forget about it!

Ajax drag and drop will NOT be supported, even in the final release of Atlas.

Only Orcas will support that.


When Oracs will be released??


Hi,

chetan.sarode:

When Oracs will be released??

Last thing I heard was the 3rd quarter of this year. You can already download a CTP:http://www.microsoft.com/downloads/details.aspx?familyid=1ff0b35d-0c4a-40b4-915a-5331e11c39e6&displaylang=en&tm.

Grz, Kris.

Web service and time zones problem in AJAX ASP.NET Beta 1.0

Hello, I have the followong exception, during requesting a webservice.

Requested URL:https://www.some_site.com/Services/Logout.asmx/js
Exception Message: Specified argument was out of the range of valid values.
Parameter name: utcDate
Exception Details: 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 Microsoft.Web.Script.Services.RestClientProxyHandler.ProcessRequest(HttpContext context)
at Microsoft.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thread: IsImpersonating = False

As I investigated, the problem originates because utcDate in method UtcSetLastModified is the date in future. This happens because the time zone on our side differs from the server's time zone where we deploy our application.

Please, HELP!

Thanks for letting us know about this problem! This looks like a valid bug.

How are you deploying your app? Am I correct in guessing you are using the "Publish web site" feature of VS or the "aspnet_compiler"? If not, can you please let me know how you deploy it?

Do you mean that the time zone is different on the computer where you built your app and the server where you deploy?

Until we fix the bug, one workaround I can think of is to "touch" the precompiled dlls in our app's bin directory to update the last modfied time on them.


We build our application using MSBuild on local TFS (one time zone), and then just copy all builded dll's and other files to production server (it is in another time zone).

Another workaround i've found is to set in ScriptManager->ServiceRefrence InlineScript property to true, then all js for my web service will be included in the output page, so there's no need to requesthttps://www.some_site.com/Services/Logout.asmx/js