locked
Problem in run window azure application from VS 2010 RRS feed

  • Question

  • Hi,

    I have a MVC 2 web application using window azure SDK 1.4. It was working fine last year. But recently when running in VS 2010, it displays error on the starting web page,

    Server Error in '/' Application.

    Value cannot be null.

    Parameter name: InString
    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.ArgumentNullException: Value cannot be null.
    Parameter name: InString

    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:
    [ArgumentNullException: Value cannot be null.
    Parameter name: InString]
       System.Convert.FromBase64String(String s) +0
       Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.GetSession(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions, Boolean exclusive) in C:\Program Files\Windows Azure SDK\Training Kit\Labs\BuildAspNetAppsWithWindowsAzure\Source\Assets\AspProviders\TableStorageSessionStateProvider.cs:770
       Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) in C:\Program Files\Windows Azure SDK\Training Kit\Labs\BuildAspNetAppsWithWindowsAzure\Source\Assets\AspProviders\TableStorageSessionStateProvider.cs:378
       System.Web.SessionState.SessionStateModule.GetSessionStateItem() +115
       System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state) +282
    
    [HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
       System.Web.HttpAsyncResult.End() +8970519
       System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar) +39
       System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +94
    

    In VS 2010, it launches a new window titled "Dissembly", in which "argumentnullexception was unhandled by user code" is shown. Stack trace shows problem is in,

    C:\Program Files\Windows Azure SDK\Training Kit\Labs\

    BuildAspNetAppsWithWindowsAzure\Source\Assets\AspProviders\

    TableStorageSessionStateProvider.cs: 770

    However there is no such folder and file on my pc. After installing Training Kit December 2012 update (I can not find version 1.4), I still can not find such file and folder. I am totally confused and need your help on this.

    Thanks,

    York


    York

    Sunday, January 13, 2013 6:20 AM

Answers

  • Hi,

    You need to upgrade to SDK 1.8 and Storage Client Library 2.0. All the references you need to remove and re-add again for the new library. For this kind of issue, I suggest you check the new version of sdk frequently and upgrade them in time. It is hard to change everything directly from 1.4 to 1.8. Some of the usage of class or method is totally different.

    Thanks,


    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by york Z Tuesday, January 15, 2013 10:34 PM
    Monday, January 14, 2013 3:38 AM

All replies

  • Hi,

    You need to upgrade to SDK 1.8 and Storage Client Library 2.0. All the references you need to remove and re-add again for the new library. For this kind of issue, I suggest you check the new version of sdk frequently and upgrade them in time. It is hard to change everything directly from 1.4 to 1.8. Some of the usage of class or method is totally different.

    Thanks,


    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by york Z Tuesday, January 15, 2013 10:34 PM
    Monday, January 14, 2013 3:38 AM
  • Because my application is MVC 2.0, I don't think it works with SDK 1.8. Last year I tried SDK 1.7, and got compatibility problem. After installed SDK 1.4, it worked fine. But I have no idea why suddenly not working now.


    York

    Monday, January 14, 2013 9:05 AM
  • Hi,

    For you error, I find asimilar thread with a solution by modifying the TableStorageSessionStateProvider.cs in GetSession().

    http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/ab11ab2e-2b75-4afc-bbd7-30067050d64c

    For the suggestion if possible, upgrade the sdk and library, also use MVC 4. Catching up with the new things won't be a bad idea. :)

    Thanks,


    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 15, 2013 2:23 AM
  • Where is TableStorageSessionStateProvider.cs ?


    York

    Tuesday, January 15, 2013 5:30 AM
  • Hi,

    From the stack trace I think you download the training kit samples: "Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.GetSession(HttpContext .."

    I think you can find the file from the installed directory for the kit package.

    Thanks,


    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 15, 2013 5:50 AM
  • After upgrade to Window Azure SDK 1.8 and MVC 4, I get different error. What is the problem?

    Server Error in '/' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Exception has been thrown by the target of an invocation.

    Source Error:

    Line 58: <providers> Line 59: <clear/> Line 60: <add name="TableStorageSessionStateProvider"

    type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider" applicationName="OTP.Ring.Web"/> Line 61: </providers> Line 62: </sessionState>


    Source File: C:\Users\zhang\Documents\Visual Studio 2010\Projects\OTP\Ring\Application\newtrunk\OTP\Ring\Web\web.config    Line: 60

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

    === Pre-bind state information === LOG: User = zhang-PC\zhang LOG: DisplayName = Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified) LOG: Appbase = file:///C:/Users/zhang/Documents/Visual Studio 2010/Projects/OTP/Ring/Application/newtrunk/OTP/Ring/Web/ LOG: Initial PrivatePath = C:\Users\zhang\Documents\Visual Studio 2010\Projects\OTP\Ring\Application\newtrunk\OTP\Ring\Web\bin Calling assembly : AspProviders, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\zhang\Documents\Visual Studio 2010\Projects\OTP\Ring\Application\newtrunk\OTP\Ring\Web\web.config LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/

    Temporary ASP.NET Files/root/c56fb567/dba05fce/Microsoft.WindowsAzure.StorageClient.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/

    Temporary ASP.NET Files/root/c56fb567/dba05fce/Microsoft.WindowsAzure.StorageClient/Microsoft.WindowsAzure.StorageClient.DLL. LOG: Attempting download of new URL file:///C:/Users/zhang/Documents/Visual Studio 2010/Projects/OTP

    /Ring/Application/newtrunk/OTP/Ring/Web/bin/Microsoft.WindowsAzure.StorageClient.DLL. WRN: Comparing the assembly name resulted in the mismatch: Minor Version ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


    York


    • Edited by york Z Tuesday, January 15, 2013 6:46 AM
    Tuesday, January 15, 2013 6:44 AM
  • Also I can not even find where training kit is installed. It does not show up in Control Panel->Program and Feature. How to find installed directory of training kit? Thanks.


    York

    Tuesday, January 15, 2013 6:54 AM