I\'m trying to publish a web application (with VS2012 Web) in which I need to run a vb script.
That script currently doesn\'t run correctly probably because of the l
It seems when you publish it ignores the project setting of unsafe, so you need to manually open your .CSPROJ file and include:
<PropertyGroup>
...
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
That solved it for me.
Googled this issue but could not find anything. Checked the *.targets files for "unsafe" which led me to the "AllowUnsafeBlocks" tag.
It's very simple to publish with a unsafe code
Here is how you do it:
Please add this code in Web.config file and check it is working for you
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/unsafe" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>