Hi I wrote a wrapper around HttpWebRequest with the constructor :
public MyHttpRequest(string requestUrl) { this.webRequest = (HttpWebRequest)WebRequest.Create(requestUrl); }
when I pass a vaild url that works in IE :
I get
System.ArgumentNullException occurred Message="Value cannot be null.\r\nParameter name: str" Source="mscorlib" ParamName="str" StackTrace: at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str) at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) at System.Uri.ParseConfigFile(String file, IdnScopeFromConfig& idnStateConfig, IriParsingFromConfig& iriParsingConfig) at System.Uri.GetConfig(UriIdnScope& idnScope, Boolean& iriParsing) at System.Uri.InitializeUriConfig() at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, UriFormatException& e) at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.Uri..ctor(String uriString) at System.Net.WebRequest.Create(String requestUriString)
Why is that ? how do i fix it ?