locked
Ajax.beginform error RRS feed

  • Question

  • When <g class="gr_ gr_28 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="28" id="28">i</g> try to use the below code 

    @using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "get", InsertionMode = InsertionMode.Replace, UpdateTargetId = "restaurantList" }))
    {
        <input type="search" name="SearchOption" />
        <input type="submit" value="Search" />
    }

    and try to browse the url i am getting below error

    Server Error in '/' Application.

    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: The compiler failed with error code 1.
    Show Detailed Compiler Output:
    C:\Program Files (x86)\IIS Express> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\9615700e\235dad3c_baafd301\EntityFramework.SqlServer.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\34f218bc\3313ab3c_baafd301\EntityFramework.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\cdf6f405\33090c3b_baafd301\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\25eb3e87\43c6d53f_baafd301\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\8a2c39a5\8399e238_baafd301\System.Web.WebPages.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\16af6f33\d30a203f_baafd301\Microsoft.Owin.Security.OAuth.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\834011bc\6501219b_00bad301\OdeToFood.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\81bb3966\e3cc9e3e_baafd301\Microsoft.Owin.Host.SystemWeb.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\76a817c7\b3622e3f_baafd301\Microsoft.Owin.Security.Google.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\f25edf8b\b3a61d39_baafd301\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\fcc172cd\6386c93e_baafd301\Microsoft.Owin.Security.Facebook.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\b02cb798\d370b039_baafd301\WebGrease.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\9041a0d1\b3838b39_baafd301\Antlr3.Runtime.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\d2230c3e\7351853e_baafd301\Owin.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\c3e17f95\e3bfd938_baafd301\System.Web.Helpers.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\f7b53aca\c349923e_baafd301\Microsoft.Owin.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\3871f164\936a793e_baafd301\Microsoft.AspNet.Identity.EntityFramework.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\8f964627\43940d3f_baafd301\Microsoft.Owin.Security.Cookies.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\bcbbefa2\936f2e39_baafd301\System.Web.Mvc.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\be8c0a63\7326c538_baafd301\System.Web.Optimization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\22de46eb\13f9e338_baafd301\System.Web.WebPages.Razor.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\06e4b2a5\c32f3d3f_baafd301\Microsoft.Owin.Security.Twitter.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\71d62529\a305de38_baafd301\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\a91c60ac\f3ea613e_baafd301\Microsoft.AspNet.Identity.Core.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\ee0faccc\6359b638_baafd301\System.Web.Razor.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\432af324\03476e3e_baafd301\Microsoft.AspNet.Identity.Owin.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\82558054\03e34e3f_baafd301\Microsoft.Owin.Security.MicrosoftAccount.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\assembly\dl3\cad93565\c377b43e_baafd301\Microsoft.Owin.Security.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\App_global.asax.miwacyce.dll" /D:DEBUG /debug+ /optimize- /warnaserror /w:4 /nowarn:1659;1699;1701;612;618 /langversion:6 /nowarn:1659;1699;1701  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\App_global.asax.miwacyce.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a769bbe0\1ca33113\App_global.asax.miwacyce.1.cs"
    
    
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0

    I am using Visual <g class="gr_ gr_143 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="143" id="143">stuido</g> 2016 with .net framework targetting 4.5.

    Monday, March 12, 2018 1:07 PM

All replies

  • Hi,

    Welcome to MSDN forum.

    This forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. It is recommend to go to Microsoft asp.net forum to discuss your problem, thank you for understanding.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 13, 2018 8:20 AM