After upgrading number of applications to version 0.5.9.0, one of my applications now results in the following error after being deployed to our IIS web server (8). The error does not occur running locally with IISExpress:
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: CS0103: The name 'ApplicationPath' does not exist in the current context
Source Error:
Line 20: <script type="text/javascript">
Line 21: //This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
Line 22: var abp = abp || {}; abp.appPath = '@ApplicationPath';
Line 23: </script>
Line 24:
Source File: c:\inetpub\wwwroot\WebFred\App\Main\views\layout\layout.cshtml Line: 22
I checked the versions of all DLLs on the server and they are correct.
Another project upgraded at the same time works correctly. Is there anything I can look at that might help resolve this issue?
Thanks,
Charlie.
1 Answer(s)
-
0
Hi,
Your view should be inherited from AbpWebViewPage. This is done by web.config file. In template: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-templates/blob/master/Templates/All-In-One-Template/MySpaProject/MySpaProject.WebSpaAngular/App/Main/web.config">https://github.com/aspnetboilerplate/as ... web.config</a>
You see <pages pageBaseType="MySpaProject.WebSpaAngular.Views.MySpaProjectWebViewPageBase">
And MySpaProjectWebViewPageBase is inherited from AbpWebViewPage.
If you can't fix it share location of the cshtml file that cause exception.
Lastly, you can remove the like and it will be work unless you publish your web site into a virtual directory under iis.