.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

xml node parse getting error while using openxml method

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

i'm working on importing xml data into sql using openxml method is working fine .but the data below is getting error while parse because of the single Quote or some other special character is available in <Cust_Name> that's the problem. how to solve this issue


<Cust_Name>John P O'Connell</Cust_Name> -- not working

<Cust_Name>John P OConnell</Cust_Name> -- working
Sudhesh. G

View Complete Post

More Related Resource Links

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

The remote server returned an error: (405) Method Not Allowed.



{System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
   at System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
   at System.Net.WebClient.UploadFile(Uri address, String fileName)
   at System.Net.WebClient.UploadFile(String address, String fileName)
   at Test.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WebSite1\Test.aspx.cs:line 35}

Windows application, automated process will run on local user system...
trying to upload a file to website folder. website address:

System.Net.WebClient wc = new WebClient();
wc.UploadFile(website address, "c:/1.pdf");

Getting error from above line.. Am doing something wrong??
I dont want to use ftp or share folder logic..
is there any other way to upload the files to server??

Ajax Cascading drop down method error 500!


Sorry to trouble you all with something that has already been posted a million times but I have tried everything I can and stuck with for about 10 days now. Please help. I have created 2 tables Categories, Subcategories.

Categories table has Category_ID(Primary Key) and "Category" fields. Subcat table has SubcatID(Primary Key, Sub_cat and Category_ID(Foreign Key). Here's the code of the asmx file.

Service methods used in ASPX file ServiceMethod="GetVendors" and ServiceMethod="GetContactsForVendor". Please help me find the source of the method erro 500 and I will be very greatful.

<%@ WebService Language="VB" Class="CascadingDropdown1" %>

Imports System.Web.Script.Services

Imports AjaxControlToolkit

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports System.Collections.Generic

Imports System.Collections.Specialized

Imports System.Data.SqlClient

<ScriptService()> _
Public Class CascadingDropdown1
Inherits System.Web.Services.WebService

<WebMethod()> _
Public Function GetVendors(ByVal knownCategoryValues As String, ByVal category As String) As Cascadi

JSON.parse error

Hi all, I am fairly new to asp.net and am just learning JSON.  I am trying to display a JSON result in a partial view, but I am getting the JSON.parse error.  I know I am getting the JSON response back - I can see it in Firebug and it must be in the correct format as I am getting the JSON tab and the data looks correct.  I am not sure what I am doing wrong.  Any help is very much appreciated. Thanks in advance, Donna Here's my code: The partial view:<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of IEnumerable (Of gmcps.StateItem))" %> <script type="text/javascript"> function getSalesRepInfo(e) { alert("state chosen is " + e.value); $.ajax({ type: "POST", url: "salesRepresentatives", data: ({ id: e.value }), dataType: "json", success: function (data) { var myObject = JSON.parse(data, function (key, value) { var type; if (value && typeof value === 'object') { type = value.type; if (typeof type === 'string' && typeof window[type] === 'function') {

PUT method gives error 400 "Bad Request" in WCF REST Service Application

I am trying to learn WCF REST Services through http://blogs.msdn.com/endpoint/archive/2010/01/14/updating-state-in-wcf-webhttp-services.aspx , It's a link of Part 3 of 12 part blog series. Now I am trying the same stuff given in the part 3 with my own Entities and Entity Model instead of what is given in the blog. Here is my full project I am working on .. http://cid-9e3f62c0688824b0.skydrive.live.com/self.aspx/.Public/pronerveEPMS.zip For comparision with the code shown in the Blog I am following, you can download the zip file of the project from the same link given here at starting (At the end of the blog and before comments starts). And here is the method in Program.cs file of console project in my application that raises the exception.....        private static Role UpdateRole(HttpClient hc, Role role1)        {            Console.WriteLine("Updating Role {0} : ",     role1.RoleID);            Console.WriteLine();            string updateURI = "Roles/" + role1.RoleID.ToString();            HttpContent content = HttpContentExtensions.CreateDataContract(role1);            using (HttpResponseMessage response = hc.Put(upd

AjaxToolkit's CascadingDropDown control is throwing Method Error 404 in Hybrid system environment (

Hi Experts, We have an Asp.net web application, which is deployed in shared hosting environment. On shared hosting environment initial request to this web application is handled by Linux server and then based on the requested page the Linux server is redirecting request to web server on windows OS. Now, in our web application, we have used ajaxToolkit's CascadingDropDown control to populate three levels of categories. In the hybrid system described above, the CascadingDropDown control is throwing Method Error 404. I would appreciate if some body can guide on how to resolve this issue. The sample of code snap shot is mentioned below. ********************************************************************* Aspx file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <asp:DropDownList ID="ddlMajorLevelCategory" runat="server" Width="250px" ToolTip="Select Major Level Category" TabIndex="1"                            SkinID="h6BlueArial"> </asp:DropDownList>   <ajaxToolkit:CascadingDropDown ID="ccMajorCategory" runat="server" TargetControlID="ddlMajorLevelCategory" Category="M" PromptText=&qu

SSIS Package Protection Level Errors - decrypt protected XML node "DTS:Password" with error 0x800900

Error 7 Error loading GetData.dtsx: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.   c:\Packages\GetData.dtsx 1 1  Error 8 Validation error. Data Flow Task: OLEDB Source [5310]: The AcquireConnection method call to the connection manager "SourceServer" failed with error code 0xC0202009. GetData.dtsx 0 0 Environment I need to execute - BIDSHave Solution, with files linked with VSS. When I click on package, aforesaid errors show up and package opens in designed.Protection Level : Encrypt Sesitive with User KeyThis means it'd run only on machine and by user where and who created respectively.So I changed it to Encrypt Sesitive with Passoword and provided Passoword. No luckSo I changed it to Do not save sensitive, as anyways in the connection manager, it has Expression saying @Variablename (with appropriate correct syntax), and variable is mapped to config file. I tired with Config file and also by hardcoding the value in the connection manager's connection string after removing the variable name, also tried by hardcoding value in variable value and disabling config file.Nothing works. I read 3 threads discussing this issue by othe

Help needed on XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

Im trying to determine if a value already exists in an XML file. In this case I want to know if there's a node "id" with value 3. But I cant figure out how...XML:<root><data><compare><locations><id>3</id><id>5</id></locations></compare></data></root>XSL:xmldoc.SelectSingleNode("//root/data/compare/locations/id=""3""")Error:XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

SQL Server 2008 R2 management studio throws an error when opening SQL Server Logs node

Hi all, I've installed SQL Server 2008 SP1 CU9 developer edition and SQL Server 2008 R2 Express side by side on my machine. When I try to open/expand SQL server logs node under Management on developer edition instance, I get the following error message: ********************************************************************************** TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ A severe error occurred on the current command.  The results, if any, should be discarded. (Microsoft SQL Server, Error: 0) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2789&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476 ********************************************************************************** The SQL Server Management Studio version is 10.50.1600.1 SQL Server 2008 SP1 CU9 version: 10.0.2789.0 SQL Server 2008 R2 express edition version: 10.50.1600.1 RTM   I don't get that error when expanding SQL Server Lo

Display error if a treeview root node contains a child node

I am having a treeview initially with a root node when form is loaded. I will add child node as some.txt file at the runtime by selecting an option as Addnew from contextmenu which was displayed when the user right clicks on the root node. Now what i need is if the tree has child node appended to the Root and if user tries to create a new node by clicking the option addnew from context menu i would like to display an error as only one child allowed.   Can any one help

Method error 500 on cascading dropdown


Why do I get a method error 500 on this code:

<asp:DropDownList cssclass="textbox" ID="ddlCountry" runat="server" />
<asp:RequiredFieldValidator Display="Dynamic" SetFocusOnError="True" ID="rfvCountry" runat="server" ControlToValidate="ddlCountry" ErrorMessage="*" InitialValue=""/>
<cc1:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="ddlCountry" Category="Country"
    prompttext="Select country" ServicePath="/LocalCities.asmx" ServiceMethod="GetCountries">

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class LocalCities
    Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function GetCountries(ByVal knownCategoryValues As String, ByVal category As String) As CascadingDropDownNameVa

Error Adding 2nd Cluster Node - Account Name Box Greyed Out


I am in the process of setting up a 2008 R2 SQL cluster using SQL 2008 R2.  I have the first node up and running, and all is well.  Going through the process to the add the 2nd node, I am stuck.

At the part where you configure the SQL service accounts, the SQL server agent account is greyed out.  Hovering your mouse over it shows that field as "Read-Only"  The box for the password you can type in, so I went ahead and put in the password I used for the account on the first node.  (it's a domain account with the corect privledges).  On the database engine section it lets me select my domain account and then I put in the password.  Clicking next gives me an error stating that the "Credentials you provided for the SQL Server Agent service are invalid."  

I know the password is correct, but without the accout name box being greyed out, I am not sure it is pointing to the right account.  Other people too are having this issue:  http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/aae80395-7d29-4a07-a1b7-29959e78d382   What is marked as a solution on that thread really isn't.  Follow up posts show other people at the same spot I am.

error code:0xC0024104 source: Reporting Task for subplan- Description: the execute method on the tas


I am getting following error when running maintenance plan under schedule job. I am getting this error for maintenance cleanup task.  The job is not failing all the time but alternate weeks. I created same maintenance plan on test server(same configuration as PROD) and Maintenance cleanup task related job failed for first time and running fine from there. I don't know why it is causing failed. I checked maintenance plan history and it show successful each time. even i checked manually it deleted all the report files related to maintenance plan. History Cleanup task and Maintenance Cleanup task should not be created on same Maintenance Plan?....I know SQL Server 2005 had some problem with maintenance plan creation before SP2.

Method in type 'x' from assemby 'x' does not have an implementation - wcf hosted in iis error


Hi All

I have created a service in my asp.net project. It works alright in dev. When I installed the website on test server I started getting this error. I could not even browse the service in IIS on the test box. I have double checked the references to service contract and implementation. If there would have been incorrect reference, I would have not found implementation in dev as well.

Please help. Thanks
-= JL =-

how can i return 401 error from a method return ActionResult?


how can i return   401 error from a method return ActionResult?

EXPERT: Method error 500 in dropdown (solution is NOT adding System.Web.Script.Services.ScriptServic


Please only answer if you have read the full question!!

Ok...this thing is driving me crazy!!!!

I keep getting a method error 500 in my dropdown box.

All the posts on the web come with the same solution, but it doesnt work for me!
The code seems SO simple and consists of so few lines....but it just doesnt work!



<asp:DropDownList ID="ddlCountries" runat="server">

<cc1:cascadingdropdown ID="cddCountries" runat="server" Category="Country" Enabled="True" LoadingText="Loading...please wait." PromptText="Choose a country" ServiceMethod="GetCountries" ServicePath="geolocation.asmx"     TargetControlID="ddlCountries"></cc1:cascadingdropdown>

<%@ WebService Language="VB" CodeBehind="~/App_Code/geolocation.vb" %>

<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
 Public Class geoloc

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend