473,756 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Argument Exception: Illegal characters in path

Hi!

I have a strange error in a console application that is hosted by IIS 5.0
and invokes a web service hosted on the same machine.

A request form the web comes in and it is dispatched to a service class
which uses a helper class to create an instance of the automatically
generated webservice proxy class. The instance creation fails on this row:

_10._0._40._252 .ETISXTeeServic e srv = new
ETISXtee._10._0 ._40._252.ETISX TeeService();

with this exception:

System.Argument Exception: Illegal characters in path

the full stack trace:

Error: System.Argument Exception: Illegal characters in path.
at
System.Security .Permissions.Fi leIOPermission. HasIllegalChara cters(String[]
str)
at
System.Security .Permissions.Fi leIOPermission. AddPathList(Fil eIOPermissionAc cess
access, AccessControlAc tions control, String[] pathListOrig, Boolean
checkForDuplica tes, Boolean needFullPath, Boolean copyPathList)
at
System.Security .Permissions.Fi leIOPermission. .ctor(FileIOPer missionAccess
access, String path)
at System.AppDomai nSetup.VerifyDi r(String dir, Boolean normalize)
at System.AppDomai nSetup.get_Conf igurationFile()
at System.Configur ation.ClientCon figPaths..ctor( String exePath, Boolean
includeUserConf ig)
at System.Configur ation.ClientCon figPaths.GetPat hs(String exePath,
Boolean includeUserConf ig)
at System.Configur ation.ClientCon figurationHost. get_ConfigPaths ()
at System.Configur ation.ClientCon figurationHost. GetStreamName(S tring
configPath)
at System.Configur ation.ClientCon figurationSyste m..ctor()
at System.Configur ation.Configura tionManager.Ens ureConfiguratio nSystem()
at System.Configur ation.Configura tionManager.Ens ureConfiguratio nSystem()
at System.Configur ation.Configura tionManager.Get Section(String sectionName)
at System.Configur ation.Privilege dConfigurationM anager.GetSecti on(String
sectionName)
at System.Diagnost ics.Diagnostics Configuration.G etConfigSection ()
at System.Diagnost ics.Diagnostics Configuration.I nitialize()
at System.Diagnost ics.Switch.Init ializeConfigSet tings()
at System.Diagnost ics.Switch.Init ializeWithStatu s()
at System.Diagnost ics.Switch.get_ SwitchSetting()
at System.Diagnost ics.BooleanSwit ch.get_Enabled( )
at System.Xml.Seri alization.TempA ssembly.LoadGen eratedAssembly( Type type,
String defaultNamespac e, XmlSerializerIm plementation& contract)
at System.Xml.Seri alization.XmlSe rializer.FromMa ppings(XmlMappi ng[]
mappings, Type type)
at System.Web.Serv ices.Protocols. SoapClientType. .ctor(Type type)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol..ctor()
at ETISXtee._10._0 ._40._252.ETISX TeeService..cto r() in E:\Documents and
Settings\juhan\ My Documents\Visua l Studio\Projects \ETISXtee\ETISX tee\Web
References\10.0 .40.252\Referen ce.cs:line 189
at ETISXtee.Utils. prepareService( ) in E:\Documents and Settings\juhan\ My
Documents\Visua l Studio\Projects \ETISXtee\ETISX tee\Utils.cs:li ne 20
at ETISXtee.Servic eReturnCountryL ist.composeBody (Object input) in
E:\Documents and Settings\juhan\ My Documents\Visua l
Studio\Projects \ETISXtee\ETISX tee\ServiceRetu rnCountryList.c s:line 22

the same webservice is correctly invoked by a test client created using
windows forms.

Of course I have googeled, but i have yet to find a solution :( any help
would be appreciated

Juhan
--
ASP.NET Developer, MCSD
Jan 12 '06 #1
3 13876
"Juhan" <Ju***@discussi ons.microsoft.c om> wrote in message
news:8F******** *************** ***********@mic rosoft.com...
Hi!

I have a strange error in a console application that is hosted by IIS 5.0
and invokes a web service hosted on the same machine.

A request form the web comes in and it is dispatched to a service class
which uses a helper class to create an instance of the automatically
generated webservice proxy class. The instance creation fails on this row:

_10._0._40._252 .ETISXTeeServic e srv = new
ETISXtee._10._0 ._40._252.ETISX TeeService();

with this exception:

System.Argument Exception: Illegal characters in path

the full stack trace:
..... Juhan
--
ASP.NET Developer, MCSD


Hi Juhan,

It seems to me that there is some bad data in a switch configuration section
in your config file. Can you paste the config file?

Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
Jan 12 '06 #2
Hi Martin

Thanks for your reply. the configuration file is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<sectionGroup name="applicati onSettings"
type="System.Co nfiguration.App licationSetting sGroup, System, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9" >
<section name="ETISXtee. Properties.Sett ings"
type="System.Co nfiguration.Cli entSettingsSect ion, System, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9" requirePermissi on="false" />
</sectionGroup>
</configSections>
<applicationSet tings>
<ETISXtee.Prope rties.Settings>
<setting name="ETISXTeeS ervice" serializeAs="St ring">

<value>http://10.0.40.252/xteewebservice/etisxteeservice/etisxteeservice .asmx</value>
</setting>
</ETISXtee.Proper ties.Settings>
</applicationSett ings>
</configuration>

Other things I should have mentioned: I am dealing with .net 2.0 and the
same problem occurs also on iis 6.0

Juhan

--
ASP.NET Developer, MCSD
Jan 13 '06 #3
I haven't still found a solution for my problem. Little more additional info:
the webservices I am using are the Sql 2005 endpoints. Could this be somekind
of a security issue?

Juhan

--
ASP.NET Developer, MCSD

Jan 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
42428
by: deko | last post by:
Is there a way to check user input for illegal characters? For example, a user enters something into a text box and clicks OK. At that point I'd like to run code such as this: illegal = Array(\, /, :, *, ?, ", <, >, |) If Me.TextBox Contains illegal Then MsgBox "You entered illegal characters. Please try again." Me.TextBox = Null
1
5432
by: Steve Grahovac | last post by:
I have been having trouble the last few days opening any ASP.NET web forms in the design view in the designer. Every time I clicked on an aspx file I got a message box with the error "Unable to open in designer. Illegal characters in path" and the file is instead opened in HTML view. I don't know what application or situation may have caused this error. I looked on the newsgroups and noticed that numerous other people were having this...
0
1726
by: paul | last post by:
I just installed Windows XP SP2 on my web server. Now when I run one of the web applications I get the following error: ArgumentException: Illegal characters in path.] System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String str) +276 System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String pathListOrig, Boolean checkForDuplicates, Boolean
1
7931
by: WALDO | last post by:
I have a small installation app that I'm building. The user can specify an install path at the command line. How can I ensure that something they put in is valid? What I'm NOT looking for is determining if a path exists. I can accomplish that with Directory.Exists(). I want them to put in a path that may not exist and I'll create it for them. What I AM looking for is making sure that the string is in the right format like C:\Program...
10
14123
by: webmaster | last post by:
Getting error: Illegal characters in path what's wrong with this? string xmlSR = "<XmlDS><table1><phone>Value1</phone><name>jake</name></table1></XmlDS>"; myDataSet.ReadXml(xmlSR, XmlReadMode.IgnoreSchema); DataList5.DataSource = myDataSet; DataList5.DataBind(); Also, what's the best way to return XML from a method for binding into
6
2841
by: =?Utf-8?B?QkJN?= | last post by:
Hi, I have an app that is crashing due to a System.ArgumentException. At this point it's just a simple app to test some basic object values. The main app is a Windows App that looks like this. Public Class DesTestForm Private Sub DesTestForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
3
3026
by: =?Utf-8?B?SG9seXNtb2tl?= | last post by:
Hi there, I am having a problem im my webservices method when trying to save a file with latin characters to disk passed through WSE. I have noticed that when trying to read the file name from all the latin characters are converted ? character which is a illegal character for file name. If my file name is N° documento per Romà
2
12516
by: ranjith konnoju | last post by:
hi, i am getting an exception while populating the data in the datagrid. am getting the values into datatable and binding it to the datagrid but it is not displaying the data and giving an exception like System.ArgumentException: Empty path name is not legal. at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options,...
4
6915
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the function creates the file as expected. When I loop through my array I get the error - "ArgumentException was unhandled - Illegal characters in path" The value "C:\Temp.txt" is the first value in the array - as it works
0
10014
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.