468,275 Members | 1,804 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,275 developers. It's quick & easy.

"That assembly does not allow partially trusted callers" what this error says....??

3
Hi,
i have uploaded my sit to web server goddady.com
i have a button to download dyanmically generated excel file.This button is ajax enabled.....When i am click on this button it will popup a message like

"That assembly does not allow partially trusted callers"
This is my web.config file Please help me on this issue?

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2.  
  3. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  4.  
  5. <configSections>
  6.          <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  7.             <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  8.                   <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
  9.                   <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  10.                      <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
  11.                      <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
  12.                      <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
  13.                   </sectionGroup>
  14.             </sectionGroup>
  15.          </sectionGroup>
  16.    </configSections>
  17.  
  18.       <appSettings>
  19.  
  20.       </appSettings>
  21.       <connectionStrings/>
  22.       <system.web>
  23.  
  24.                <compilation debug="false">
  25.             <assemblies>
  26.                   <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  27.                   <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  28.                   <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  29.                   <add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  30.                   <add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  31.                   <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  32.                   <add assembly="Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/>
  33.                   <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  34.             </assemblies>
  35.             <buildProviders>
  36.                   <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  37.             </buildProviders>
  38.          </compilation>
  39.  
  40.                <authentication mode="Windows"/>
  41.  
  42.                <pages styleSheetTheme="Smoke">
  43.                      <controls>
  44.                               <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  45.                      </controls>
  46.                </pages>
  47.  
  48.                <customErrors mode="Off" defaultRedirect="Error.aspx">
  49.                </customErrors>     
  50.  
  51.                <httpHandlers>
  52.                      <remove verb="*" path="*.asmx"/>
  53.                      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  54.                      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  55.                      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
  56.                </httpHandlers>
  57.                <httpModules>
  58.                      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  59.                </httpModules>
  60.                      <identity impersonate="true" />
  61.  
  62.       </system.web>
  63.  
  64.       <system.web.extensions>
  65.                <scripting>
  66.                      <webServices>
  67.  
  68.                      </webServices>
  69.  
  70.                </scripting>
  71.       </system.web.extensions>
  72.       <system.webServer>
  73.                <validation validateIntegratedModeConfiguration="false"/>
  74.                <modules>
  75.                      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  76.                </modules>
  77.                <handlers>
  78.                      <remove name="WebServiceHandlerFactory-Integrated"/>
  79.                      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  80.                      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  81.                      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  82.                </handlers>
  83.       </system.webServer>
  84.  
  85. </configuration>
  86.  
Feb 25 '08 #1
1 7053
This is a security issue with the .NET framework - running ASP.NET applications in shared hosting environments such as GoDaddy tends to give rise to this as you are running in medium trust as opposed to the full trust environment that you develop with.

There is a solution, but it requires a bit of explanation - this article on Allowing Partially Trusted Callers in ASP.NET explains what the issue is and provides a solution.

Good luck.
Feb 16 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by DotNetJunkies User | last post: by
2 posts views Thread by Vitali Gontsharuk | last post: by
reply views Thread by et | last post: by
1 post views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.