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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nish85
    New Member
    • Oct 2007
    • 3

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

    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.....Whe n 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?

    [code=xml]
    <?xml version="1.0"?>

    <configuratio n xmlns="http://schemas.microso ft.com/.NetConfigurati on/v2.0">

    <configSections >
    <sectionGroup name="system.we b.extensions" type="System.We b.Configuration .SystemWebExten sionsSectionGro up, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5">
    <sectionGroup name="scripting " type="System.We b.Configuration .ScriptingSecti onGroup, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5">
    <section name="scriptRes ourceHandler" type="System.We b.Configuration .ScriptingScrip tResourceHandle rSection, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5" requirePermissi on="false" allowDefinition ="MachineToAppl ication"/>
    <sectionGroup name="webServic es" type="System.We b.Configuration .ScriptingWebSe rvicesSectionGr oup, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5">
    <section name="jsonSeria lization" type="System.We b.Configuration .ScriptingJsonS erializationSec tion, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5" requirePermissi on="false" allowDefinition ="Everywhere "/>
    <section name="profileSe rvice" type="System.We b.Configuration .ScriptingProfi leServiceSectio n, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5" requirePermissi on="false" allowDefinition ="MachineToAppl ication"/>
    <section name="authentic ationService" type="System.We b.Configuration .ScriptingAuthe nticationServic eSection, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5" requirePermissi on="false" allowDefinition ="MachineToAppl ication"/>
    </sectionGroup>
    </sectionGroup>
    </sectionGroup>
    </configSections>

    <appSettings>

    </appSettings>
    <connectionStri ngs/>
    <system.web>

    <compilation debug="false">
    <assemblies>
    <add assembly="Syste m.DirectoryServ ices, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
    <add assembly="Syste m.Windows.Forms , Version=2.0.0.0 , Culture=neutral , PublicKeyToken= B77A5C561934E08 9"/>
    <add assembly="Syste m.Design, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
    <add assembly="Syste m.Messaging, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
    <add assembly="Syste m.Configuration .Install, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
    <add assembly="Syste m.Transactions, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= B77A5C561934E08 9"/>
    <add assembly="Micro soft.Office.Int erop.Excel, Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c"/>
    <add assembly="Syste m.Web.Extension s, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    </assemblies>
    <buildProviders >
    <add extension=".rdl c" type="Microsoft .Reporting.RdlB uildProvider, Microsoft.Repor tViewer.Common, Version=8.0.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a"/>
    </buildProviders>
    </compilation>

    <authenticati on mode="Windows"/>

    <pages styleSheetTheme ="Smoke">
    <controls>
    <add tagPrefix="asp" namespace="Syst em.Web.UI" assembly="Syste m.Web.Extension s, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    </controls>
    </pages>

    <customErrors mode="Off" defaultRedirect ="Error.aspx ">
    </customErrors>

    <httpHandlers >
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false " type="System.We b.Script.Servic es.ScriptHandle rFactory, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    <add verb="*" path="*_AppServ ice.axd" validate="false " type="System.We b.Script.Servic es.ScriptHandle rFactory, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    <add verb="GET,HEAD" path="ScriptRes ource.axd" type="System.We b.Handlers.Scri ptResourceHandl er, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5" validate="false "/>
    </httpHandlers>
    <httpModules>
    <add name="ScriptMod ule" type="System.We b.Handlers.Scri ptModule, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    </httpModules>
    <identity impersonate="tr ue" />

    </system.web>

    <system.web.ext ensions>
    <scripting>
    <webServices>

    </webServices>

    </scripting>
    </system.web.exte nsions>
    <system.webServ er>
    <validation validateIntegra tedModeConfigur ation="false"/>
    <modules>
    <add name="ScriptMod ule" preCondition="i ntegratedMode" type="System.We b.Handlers.Scri ptModule, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    </modules>
    <handlers>
    <remove name="WebServic eHandlerFactory-Integrated"/>
    <add name="ScriptHan dlerFactory" verb="*" path="*.asmx" preCondition="i ntegratedMode" type="System.We b.Script.Servic es.ScriptHandle rFactory, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    <add name="ScriptHan dlerFactoryAppS ervices" verb="*" path="*_AppServ ice.axd" preCondition="i ntegratedMode" type="System.We b.Script.Servic es.ScriptHandle rFactory, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    <add name="ScriptRes ource" preCondition="i ntegratedMode" verb="GET,HEAD" path="ScriptRes ource.axd" type="System.We b.Handlers.Scri ptResourceHandl er, System.Web.Exte nsions, Version=1.0.610 25.0, Culture=neutral , PublicKeyToken= 31bf3856ad364e3 5"/>
    </handlers>
    </system.webServe r>

    </configuration>
    [/code]
    Last edited by Plater; Feb 25 '08, 04:12 PM. Reason: added CODE tags
  • BM72837
    New Member
    • Feb 2009
    • 1

    #2
    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.

    Comment

    Working...