2012-11-27 63 views
1

我recenlty更新Azure的SDK 1.8後產生的Silverlight類,但生成的代碼文件中包含這樣的錯誤:WCF停止Azure的SDK更新

/// <summary> 
    /// Gets the context that is registered as a lifetime object with the current application. 
    /// </summary> 
    /// <exception cref="InvalidOperationException"> is thrown if there is no current application, 
    /// no contexts have been added, or more than one context has been added. 
    /// </exception> 
    /// <seealso cref="System.Windows.Application.ApplicationLifetimeObjects"/> 
    public new static WebContext Current 
    { 
     get 
     { 
      return ((WebContext)(WebContextBase.Current)); 
     } 
    } 

塔拉巴尼

回答

0

我發現下面的解決方案了。添加以下代碼到的app.config和web.config中:

<runtime> 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="Microsoft.WindowsAzure.StorageClient" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 
    <bindingRedirect oldVersion="1.1.0.0" newVersion="1.7.0.0" /> 
    </dependentAssembly> 
</assemblyBinding> 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="Microsoft.ServiceBus" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 
    <bindingRedirect oldVersion="1.6.0.0" newVersion="1.7.0.0" /> 
    </dependentAssembly> 
</assemblyBinding> 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="Microsoft.ApplicationServer.Caching.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 
    <bindingRedirect oldVersion="101.0.0.0" newVersion="1.0.4655.0" /> 
    </dependentAssembly> 
</assemblyBinding> 

+0

但我仍面臨着一些問題,當上傳到Azure上。我得到這樣的錯誤: –