473,516 Members | 2,889 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

When I try to search the website I am getting "Illegal characters in path" error

1 New Member
Hi,

When I try to search my website i am getting the following error. Illegal characters in path highlighting doc.Load(url);

Here is my code:
Expand|Select|Wrap|Line Numbers
  1. public ActionResult Index()
  2. {
  3.     string url = ConfigurationManager.AppSettings.Get("SearchBloxServer") + "?col=" + ConfigurationManager.AppSettings.Get("SearchBloxCollectionID") + "&" + HttpContext.Request.QueryString.ToString();
  4.  
  5.     ViewBag.TransformSource = "~/upload/xsl/default.xsl";
  6.     XmlDocument doc = new XmlDocument();
  7.     doc.Load(url);
  8.  
  9.     return View(doc);
  10. }
Nov 19 '14 #1
1 1076
Rabbit
12,516 Recognized Expert Moderator MVP
That's a pretty clear error message, you have characters in the doc variable that are illegal. Get rid of the illegal characters and it should work fine.
Nov 19 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4842
by: tschulken | last post by:
I am trying to get certain nodes within an xml doc that contain certain text (similar to a SQL LIKE). In doing so I am using the XPATH Contains function and have not been successful. When I run I get the following error: System.Xml.XPath.XPathException: XsltContext is needed for this query because of an unknown function. I can successfully...
4
1797
by: Larry Tate | last post by:
I am wanting to get those cool html error pages that ms produces when I hit an error in asp.net. For instance, when I get a compilation error I get an html error page that shows me the Description: Compiler Error Message: Source Error: Source File: The main thing I want is the Source Error. This give me a few lines of the
4
3407
by: mmnenator | last post by:
When I send mail use smtpmail get error: Mailbox unavailable.(asp.net 2.0)
3
3555
by: emmaruwa | last post by:
The following VBA code, in Access 2003, is to make a button open and populate a form based on the Surname and Period_frm data on a previous form. However, i keep getting a type mismatch error whenever i click the button. I've tried changing the stLinkCriteria2 type to String but the same thing happens. Does anyone know why? Private Sub...
1
1841
by: Omar | last post by:
Hi All, We have several .NET websites running on IIS 6.0. At the moment, if a website is down, Admin will not know until one of the users reports it. Is there a way that we can have the admin alerted when a website is down? Thanks and regards, Omar
2
2364
by: mrsgwen90 | last post by:
I am trying to update a record using access as the front end and VB 6.0 as the backend. I am using a SQL statement to accomplish this. But I am getting the "Write Conflict Error". I have tried adding the 'Timestamp field as someone suggested but that isn't working. Here is my code. Please advise Private Sub cmdAddRec_Click() On Error GoTo...
2
2408
by: preeti13 | last post by:
Hi guys i am here with my another probelm please help me.trying insert the value into the data base but getting the null value error .I am getting thsi error Cannot insert the value NULL into column 'EmployeeID', table 'Accomplishments.dbo.Accomplishment'; column does not allow nulls. INSERT fails. The statement has been terminated. ...
1
1607
by: Rahul | last post by:
I am getting following error: 1) For a xml file "Request.xml" we created a schema "Request.xsd". 2) With the help of xsd.exe we got the C# file Request.cs. 3) We tried to send the object of Request.cs to a webservice method SaveRequest(Request req). 4) Scenario is like same Request.cs is referenced by both server and
2
2039
by: baskaranbharathi | last post by:
i am using McAfee antivirous.when i scan my system i got error 2147467259.how i slove this problem.
1
2299
by: falcs | last post by:
I am using a search engine www.sciencedirect.com in part of my code. I want to search for keywords and find how many results there are. My code works fine, all I need is the URL to submit search queries, Initially I tested the code with the basic search function and got it to work, basically its just: http://www.sciencedirect.com/science?= ...
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7408
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. ...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7548
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...
0
5714
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...
0
3267
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...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
488
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...

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.