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


Top 5 Contributors of the Month
satyapriyanayak
SP
Sambanthamoorthy
Swati Kadam
rosgeppe
Post New Web Links

How to avoid network problems while calling a webservice in a SQL CLR trigger?

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
 
Hi All, My Goal: DB synchronization between SQL server 2005 and Mysql database via web services. I have created a SQLCLR trigger, in which i'm calling a web service to sync/update remote (MYSQL) DB over a specific constraints. After getting the acknowledgment from web service i'm updating the sync flag to success (In SQL SERVER2005). If any network delay happens i am unable to know whether sync has done successfully or not. How to avoid network dependency here? Is there any reliable queuing mechanism available in sql server 2005 to eliminate dependency over network? I am looking any suitable service/approach in sql server 2005 that can take care of calling web services as asynchronously and update the status of sync flag irrespective of network. Thanks in advance if anyone provide the good approach as step by step in detail.


View Complete Post


More Related Resource Links

Top .NET Performance Problems and how to avoid them

  
Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

Calling webservice from the server

  
Hi

I have a sample web service and aspx file. I deployed them to an existing website that contains classic asp files.

web-service: --- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; [WebService(Namespace = "http://localhost/MyWebServices/")] public class MembershipRegisWebService : System.Web.Services.WebService { public MembershipRegisWebService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World."; } }

aspx.cs file: --- using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services; public partial class CallWebService : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { MembershipRegisWebService mrWs = new MembershipRegisWebService(); Response.Write("Calling web service:" + mrWs.HelloWorld()); } }

It runs locally, but it shows an error when running it from the server:

Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the follow

Calling a webservice in MVC using jquery works on dev box not prod box

  

I have a webservice that is part of the MVC project.  I am using VS 2010 MVC 2.0 on Windows 7.  When I run the web application locally the webservice call works flawlessly, however on the prod box using  2008 upgraded with asp.net 4.0 it fails.

I get an error "The controller for path '/services/traxservices.aspx/upDateCustomer' was not found or does not implement IController. "

Is there some type of issue with the settings in the global.ascx or in IIS that I am missing?

 

Any help would be appreciated.


WCF MTOM Client calling Java Webservice - Issues with File attachment Content ID encoded in SOAP mes

  
Hello,I'm having difficulty calling a MTOM enabled Java based web service that accepts an file as input..NET appeats to be generating a SOAP message where the reference to the binary part of the message is an encoded url.For Example:  <inc:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F634000265217257868" xmlns:inc="http://www.w3.org/2004/08/xop/include"/>In fact, the Content ID defined in the SOAP message, looks nothing like the actual Content ID of the actual message part.Content-ID: <http://tempuri.org/1/634000265217257868=2787915398744@soapui.org>The service is invoked and executed on the java webserver...but the data element appears to be null.I do not believe the java web server understands the reference in the SOAP message because it is encoded....Or...perhaps it's because the Content-ID attribute has extract stuff on it.I'm working with a custom MTOM encoder in WCF....is there a way to generate your own Content ID or tell .NET not to encode the url?My frustration with .NET has reached an all new level with this project...Any help would be greatly appreciated.Here the SOAP message that is being generated:<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200901" xmlns:ns1="http://docs.oasis-open.org/ns/cmis/core/200901&q

how to avoid grid view function calling repeatedly in itemtemplate

  


Hi

i have a grid view control

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowUpdating="Update_1"
                    OnRowDeleting="Delete_1" OnPageIndexChanging="OnPaging" OnRowEditing="Edit_1"
                    OnRowCancelingEdit="CancelEdit" PageSize="10">
                    <Columns>
<asp:TemplateField>
                              <ItemTemplate>
                                <table>
                                    <tr>
                                        <td align="left" width="100">
                                            <cc1:CalendarExtender ID="cal" runat="server" TargetControlID="txtDate" PopupButtonID="btnpopupCalendar"
                                            >
                                            </cc1:CalendarExtender>
                                            <asp:Button ID="btnpopupCalendar" runat="server" Text="Show Calendar"  />
                                        </td>
                                        <td align="left" width="100">
                             

Webservice timeout while calling windows service

  

Hi,


We have a .net product built in .Net 2.0.
It consist of three blocks.
First is a asp.net web application which calls webservice which in turn call a windows service to get results from database.
Our problem is that windows service is taking time to get results from database because of which timeout is occuring.

Now we have already set timeout property in web application while calling web service through proxy. However, we could not find how to set timeout property for webservice(This will stop webervice from timeout before windows service send back the result).

If somebody have done it, please help

Cheers
TicArch


WCF calling webservice - assigning return value taking a long time

  
0 down vote favorite

I have a wcf service (WCF_A ) which calls another wcf service (WCF_B) (currently I am hosting the WCF_B on my local machine with my credentials – as windows service), WCF_B internally makes a call to a webservice (WS01) that is hosted on the IIS. I have created a test client and call the WCF_A -> WCF_B -> WS01. Just before making the call to (WS01) I start a timer and I stop the timer when the webservice call comes back and the result is assigned to a variable, the flow is as below WCF_B

1)  Debug.WriteLine(“Call to webservice”) 
2)  Starttimer 
3)  Var result = WS01.Function(xxxx) 
4)  Stop

Getting Error SECU1075: While calling webservice from C# DLL,WinForms

  

Hi,

I have designed a console application as a web service client which is able to talk with webservice; however instead of console application if I design a WinForm or DLL of the same code I am getting following error message.

SECU1075: An error was discovered processing the <wsse:Security> header | System.Web.Services |    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)...

The only difference I figured out is, in case of DLL or WinForm it is creating an extra DLL with name <ProjectName>.XmlSerializers.dll which is not the case with Console application.

Anybody know what should I need to do to call the webservice from DLL instead of console application? Help appreciated


jQuery / javascript calling a webservice

  

I've tried a bunch of different examples and still can't get this to work.

I have a jQuery GalleryView control I'm using and I simply want to log impressions.  I set up a webservice that works, but I can't figure out how to get it to work in javascript.  I have verified that the webservice is working as expected.


Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptServ

calling a trigger after insert sp

  

i want  to create a trigger after i insert record in table1 and in trigger there will be an update sentece which updates x column in table2 

so

i have a stored procedure like

insert into Table1(a,b,c) values(1,2,3)

select @@identity

then

my trigger should update table 2

update table2 set x=5 where id=@a

@a parameter must come from my insert stored procedure's select @@identity line

 

how can i create a trigger like this? this will be my first trigger so i dont know anything about them

after creating trigger i think i should control if it execute successfully or not in my insert stored procedure so if it works successfully my insert is ok but if trigger doesnt work my insert sentence shouldnt work

 

could anyone help me about that?

 

thanks

 


sproc calling sproc - output value problems

  

I have the following two sprocs:

USE [Ecotech]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Ecotech_AddUser]
@aspnet_id uniqueidentifier,
     @last_name nvarchar(255),
     @first_name nvarchar(255),
     @address1 nvarchar(255),
     @address2 nvarchar(255), 
     @zip nvarchar(10),
     @city nvarchar(255),
     @tlf_mobile nvarchar(16),
     @tlf_home nvarchar(16),
     @tlf_office nvarchar(16),
     @country nvarchar(16),
     @email nvarchar(50),
     @status int output
AS
BEGIN
    SET NOCOUNT ON;

    if (select COUNT(*) from ecotech_users where aspnet_id = @aspnet_id) > 0
        begin
            set @status = 0
        end
    else
        begin
            insert 
            into ecotech_users 
                (aspnet_id, 
                 last_name, 
                 first_name, 
                 address1, 
                 address2, 
                 zip, 
                 city, 
                 tlf_mobile, 
                 tlf_home, 
                 tlf_office, 
                 country,
                 email)
            values 
                (@aspnet_id,
                 @last_name,
                 @first_name,
                 @address1,
                 @address2, 
                 @zip,
                 @city,
                 @tlf_mobile,
                 @tlf_home,
             

Protocol error (503 Service unavailable) when calling webservice from Win2003

  

I'm receiving a 503 Service unavailable -error from a webservice when calling client is on WinServer 2003.

Scenario: Windows Forms (.NET 4) application calls remote webservice on windows server 2003 to fetch information.
In some cases it takes a long time for the WebService to get the informationa (long running database procedure) so the client waits for the response.
WebService timeouts are set at +30min.

The setup has worked fine for some time now but recently we discored that a particular long running request began to fail.
The Windows Forms client fails with a 503: Service Unavailable -error and ProtocolError after just a couple of minutes into waiting for the response.

We did some testing and this error occurs if the client application is installed on a Windows Server 2003 box.
If we do the same test with the client application installed on a Windows 7 box it works without errors.

It seems that it has something to do with Windows 2003 but how to debug this?
Anyone have any ideas what could be the problem?

 


Calling Webservice from Javascript side

  

This is the webservice am using.

 

namespace BEASTiLIMS
{
    /// <summary>
    /// Summary description for PLCWebClientAccess
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
     [System.Web.Script.Services.ScriptService]
    public class PLCWebClientAccess : System.Web.Services.WebService
    {

        [WebMethod(EnableSession = true)]
        public void SetOCXValues(string version,string clsId,string cabPath)
        {
            Session["ClassId"] = clsId;
            Session["VersionNumber"] = version;
            Session["CabPath"] = cabPath

Calling an ASP.NET Webservice from another domain

  

I have run into an issue in calling an ASP.NET webservice from an outside domain name, I am getting Access Denied.

Domain1.com
Call ASP.NET webservice (located on Domain2.com) from JavaScript (or any other means) 

Domain2.com
Host of the ASP.NET webservice.

I would like to give a piece of javascript code to our readers (Domain1.com) to paste in their website page that will bring in a Div some data that is located on our servers on Domain2.com

I was using XMLHttpRequest but is is considered in above scenario as cross site scripting. Is there any way to accomplish this?

Thank you.

 


Categories: 
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