 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

June 13th, 2011, 09:33 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Can i see the string that causes issue
When i try to view myprofile.aspx page i get anIllegal characters in path error. I have supplied the trace below but can i get it to actually output the path it's trying to pass so i can see what it looks like?
Thanks,
Mark
[ArgumentException: Illegal characters in path.]
System.Security.Permissions.FileIOPermission.HasIl legalCharacters(String[] str) +9369221
System.Security.Permissions.FileIOPermission.AddPa thList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +73
System.Security.Permissions.FileIOPermission..ctor (FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) +43
System.IO.Path.GetFullPath(String path) +91
System.Data.Metadata.Edm.MetadataArtifactLoader.No rmalizeFilePaths(String path) +158
[MetadataException: At least one of the input paths is not valid because either it is too long or it has incorrect format.]
System.Data.Metadata.Edm.MetadataArtifactLoader.No rmalizeFilePaths(String path) +185
System.Data.Metadata.Edm.MetadataArtifactLoader.Cr eate(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +60
System.Data.Metadata.Edm.MetadataCache.SplitPaths( String paths) +271
System.Data.Common.Utils.<>c__DisplayClass2.<Evalu ate>b__0() +19
System.Data.Common.Utils.Result.GetValue() +100
System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg) +181
System.Data.EntityClient.EntityConnection.GetMetad ataWorkspace(Boolean initializeAllCollections) +292
System.Data.Objects.ObjectContext.RetrieveMetadata WorkspaceFromConnection() +29
System.Data.Objects.ObjectContext..ctor(EntityConn ection connection, Boolean isConnectionConstructor) +205
System.Data.Objects.ObjectContext..ctor(String connectionString) +23
System.Web.UI.WebControls.EntityDataSourceView.Con structContext() +467
System.Web.UI.WebControls.EntityDataSourceView.Exe cuteSelect(DataSourceSelectArguments arguments) +76
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +97
System.Web.UI.WebControls.ListControl.PerformSelec t() +34
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +74
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +66
System.Web.UI.WebControls.ListControl.OnPreRender( EventArgs e) +29
System.Web.UI.WebControls.CheckBoxList.OnPreRender (EventArgs e) +13
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
|
|

June 13th, 2011, 09:46 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
In what folder on your disk is the site located?
Imar
|
|

June 13th, 2011, 09:51 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
It's in the base dir
markglen.co.uk/MyProfile.aspx
that's what you see ont eh browser but the site is actually in
markglen.co.uk/wwwroot/MyProfile.aspx
|
|

June 13th, 2011, 09:57 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I meant the physical folder on disk, e.g C:\Whatever\Something
Imar
|
|

June 13th, 2011, 10:31 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Ah,
I'm currently running this on my remote server.
Will have a look what my local dir is when i get home from work.
Thanks,
Mark
|
|

June 13th, 2011, 10:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You can use Server.MapPath("~/") in a page to output the path from code....
Imar
|
|

June 15th, 2011, 09:46 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
No idea what i did but it seems to be working now.
Thanks
|
|
 |
|