locked
deploying problem RRS feed

  • Question

  • User-906846774 posted

    Hi i have developer a little asp.net project using vs 2013 and sql server express2008r2. all work fine in local but when i publish on my hosting provider i get this error:

    System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    this is my web.config:

    <?xml version="1.0"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>

    <connectionStrings>
    <add name="PLURIMAPCDBConnectionString" connectionString="Data Source=62.149.153.39;Initial Catalog=MSSql92446;Integrated Security=no;uid=MSSql92446;pwd=***********" providerName="System.Data.SqlClient" />
    </connectionStrings>

    <location allowOverride="false">
    <system.web>

    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
    <assemblies>
    <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    </assemblies>

    <buildProviders>

    </buildProviders>

    </compilation>

    <globalization culture="it-IT" uiCulture="it-IT" />
    <customErrors mode="Off"/>

    <authentication mode="Forms">
    <forms name=".ASPXFORMSDEMO" loginUrl="login.aspx" protection="All" path="/" timeout="30" />
    </authentication>

    <authorization>
    <deny users="?" />
    <allow users="*" />
    </authorization>
    </system.web>

    <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />

    </system.webServer>
    </location >
    </configuration>

    I also read to add <trust level="Full"/> but not work for me. i want to know what kind of problem is. it's related to permission on database??

    help me please , thank you very much

    Friday, March 14, 2014 8:10 AM

All replies

  • User311508580 posted

    Hi leonep,

    From the above error message, you need full trust permision to run your site. Does your hosting provider support Full Trust? Please kindly ask their support team to setup full trust for you.

    Friday, March 14, 2014 11:48 PM
  • User-1454326058 posted

    Hi leonep,

    In my opinion, I think that isn’t the permission on the database.

    Please set the full trust level in the IIS instead of in the web.config and check the result.

    1. Select the website in the IIS
    2. Click .Net Trust Levels icon in the IIS feature view.
    3. Change the truse level.

    On the other hand, please provide the detail error message that you get. (E.g. which line of code that you get the error)

    Thanks

    Best Regards

    Monday, March 17, 2014 4:27 AM