简体   繁体   中英

Trouble with resx file, while deploying site on IIS

So i am trying to deploy my web asp.net mvc website on IIS. It works perfectly on my pc etc, but after deployment i am getting this error:

Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0122: 'Microsoft.AspNet.Identity.Resources' is inaccessible due to its protection level

Source Error:

    <a href="javascript:document.getElementById('logoutForm').submit()" class="exit">@Resources.Localization.exit</a>

My build action property on Resources.Localization is set to Embedded Resource

I have found a tip here:

http://forums.asp.net/t/1442744.aspx?Problem+deploying+MVC+app+on+IIS7

And changed it value to Content another error appears:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "BTGHRM.App_GlobalResources.Localization.resources" was correctly embedded or linked into assembly "BTGHRM" at compile time, or that all the satellite assemblies required are loadable and fully signed.

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.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "BTGHRM.App_GlobalResources.Localization.resources" was correctly embedded or linked into assembly "BTGHRM" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Error Source:

Line 40:                                     @Html.LabelFor(m => m.UserName, new { style = "color:#0D5C9F;font-size:13px;font-weight:bold;" })

这里

Just copied (cntrl-c cntrl-v) a resource file to the server and it worked. Just wtf.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM