Server Error in '/' Application.

Illegal characters in path.

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.ArgumentException: Illegal characters in path.

Source Error:


Line 307:                        app.Context.RewritePath(url + eShop.App_Code.K.ioPage, "", query);
Line 308:                    }
Line 309:                    else if (System.IO.File.Exists(this.Server.MapPath(app.Request.ApplicationPath + "/" + akce + ".aspx")))
Line 310:                    {
Line 311:                        app.Context.RewritePath(url + akce + ".aspx", "", query);

Source File: c:\www\www.smlouva-smlouvy.cz\Global.asax    Line: 309

Stack Trace:


[ArgumentException: Illegal characters in path.]
   System.IO.Path.CheckInvalidPathChars(String path) +126
   System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str) +54
   System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +73
   System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +63
   System.Web.InternalSecurityPermissions.PathDiscovery(String path) +29
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +146
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath) +37
   System.Web.HttpServerUtility.MapPath(String path) +99
   ASP.global_asax.Application_BeginRequest(Object source, EventArgs e) in c:\www\www.smlouva-smlouvy.cz\Global.asax:309
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


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