Problems In Calling SQL Server 2005 Web Service Asynchronouslly!
Jan 22, 2007
I have created a SOAP/HTTP end point which returns .NET DataSet ( ... FORMAT=ROWSETS_ONLY ... ). Then I created a proxy class using Visual Studio 2005 and wrote a cusumer .NET class in which I call that web service's method synchronously. Everything is Ok but when I call asynchronously "TargetInvocationException" is raised. I need urgent solution to this problem.
I need to create a stored procedure (SQL 2005). I did it in C# (Visual Studio). The .dll file (inside) uses web services of Project Server 2007 (I just need to log on, create a project and log out). I prepared 2 files (exactly the same code): dll an exe. the .exe works fine. the problem is with .dll file (stored procedure in SQL)...
by the way: I created serialization file with sgen tool.
the problems start when I am trying to register these 2 .dlls in SQL server. I can do that in unsafe mode only. when I am trying to register them in externall access (normal dll) and safe mode (serialization .dll) I am getting errors:
CREATE ASSEMBLY failed because method "add_QueueCheckInProjectCompleted" on type "ConsoleApplication11.ProjectWebSvc.Project" in external_access assembly "ConsoleApplication11" has a synchronized attribute. Explicit synchronization is not allowed in external_access assemblies
thus I did it in unsafe mode (both of them). than I created the procedure.
Now, I tried to call that procedure. I am getting error:
A .NET Framework error occurred during execution of user defined routine or aggregate 'Main':
System.Net.WebException: The request failed with the error message:
<h2>Object moved to <a href="http://my_comp:22278/projectserver/_layouts/1033/error.aspx?ErrorText=Object%20reference%20not%20set%20to%20an%20instance%20of%20an%20object%2E">here</a>.</h2>
</body></html>
--.
System.Net.WebException:
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)
at ConsoleApplication11.ProjectWebSvc.Project.QueueCreateProject(Guid jobUid, ProjectDataSet dataset, Boolean validateOnly)
at ConsoleApplication11.Program.Main()
That means "Object reference not set to an instance of an object". the problem occurs when calling QueueCreateProject method
I dont understand that error. I wrote the same code for .dll and .exe. the .exe file is working ok (no errors) but .dll (as a stored procedure) shows this error
my code in C#:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Net;
using PSLibrary = Microsoft.Office.Project.Server.Library;
I am trying to call a Web Servie within a SSIS package. I want to pull a row at a time from a SQL Server 2005 table and pass this data values onto the web service.
I'm trying to return Annotations from a BSM scorecard by calling the PMService.asmx web service. I can successfully call operations like "GetScorecards" that require no parameters...but I keep getting the same error when trying to call "GetAllAnnotationsbyScorecardID"
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlnsoap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soaperver</faultcode> <faultstring>Server was unable to process request. --> scorecardID</faultstring> <detail /> </soap:Fault> </soap:Body> </soap:Envelope>
Am I structuring the Query the right way? Not sure if I'm a passing the guid correctly...I got the scorecard guid from the result set of calling "GetScorecards"
Is it possible to call a WCF service from a SQL CLR.
We have had success calling standard web services by including a Proxy in the Assembly but I wondered if it's possible to call out to a WCF service as the enpoint configuraion is done with an external XML file and I don't know if this will work in the same way. We may want to alter the wcf configuration depending on where the service is sitting, same box or remote.
Please do not respond with 'why do you want to do this' the reson we want to do this is because we use Service broker to recieve incoming messages and want to trigger a stored procedure to do some work on an external service when it recives some data.
Hi, I have got a simple C# assembly which call a ASP.net web service and executes a webmethod, now i want to call this assembly from sql server 2005 within the sql server function. can any body let me know how to do it. Thanks
Hi , I have a question about calling functions in SQl Server 2005.
Let's say that I have created as a dbo a function called Calculations.
If I want to call it from T-SQL I will write Select dbo.Calculations (arguments if any) etc.
My question is If I can skip the "dbo" part. Call the function without using the dbo . Can I do that ? Should I create the function as supervisor ? Does Sql Server has a property or something which will allow me to call the function without using the "dbo." ?
Setup: I have a C# 2.0 class library that contains certain business logic that is to be triggered by certain database states. There is a trigger that calls a stored procedure that is working properly (i.e. the stored procedure is being executed). Problem: I have not yet figured out how to call the dll from the stored procedure. Does anybody have any tutorials they could point me to or any advice to point me in the right direction? Thanks in advance for any help.
Hi: I a SSIS beginner and am hoping this is an easy one. I am using a Foreach loop container with an in-memory ADO recordset as the enumerator. The recordset has 3 columns and one of them I wish to fixup data in by calling a web service task that returns an integer. I see how to call the web service and return the integer into a variable but am unsure how to approach putting that variable back into the in-memory ADO recordset? Should I even be trying to do it this way? thanks! Henry
I used the URL approach to call the reporting service. In the ASP page, I use javascript to open a new window to view the report. But when I close the new window and work on the original window. It seems that the DB connection to the SQL server is not working.
Hi, I need to call a webservice directly from a tigger or stored procedrue instead of creating a window service to read from a table then call the webservice .Is it possible ? if yes, please i need your support. Thanks,
Hi, I create a dll assembly with the strong name in VB.Net environment. Created assembly is registered also. SQL Server 2005 configuraton level is set at "80" I want to call that assembly from stored procedure with the database config level at "80" But when i execute the stored proecure i get the following error Error Source: "ODSOLE Extended Procedure" Description: "Invalid Class String"
My Code in VB.Net is given below: Imports System Imports System.Reflection Imports System.Globalization Imports System.IO Imports System.data Imports System.Data.SqlClient Imports System.Data.SqlTypes Imports Microsoft.SqlServer.Server Imports Microsoft.VisualBasic Imports System.Diagnostics Imports GreatDataAccess
Namespace Test Public Class clsTest
Public Shared Sub GenTest() ''''............ some code is here End Sub End Class End Namespace
Stored Procedure CREATE PROCEDURE [dbo].[PPGenerateFile] AS BEGIN Declare @retVal INT Declare @comHandler INT declare @errorSource nvarchar(500) declare @errorDescription nvarchar(500) declare @retString nvarchar(100)
-- Intialize the COM component
EXEC @retVal = sp_OACreate Test.clsTest, @comHandler OUTPUT IF(@retVal <> 0) BEGIN --Trap errors if any EXEC sp_OAGetErrorInfo @comHandler,@errorSource OUTPUT, @errorDescription OUTPUT SELECT [error source] = @errorsource, [Description] = @errordescription Return END
I'm pretty stuck on a security issue in SSIS. The web service works by itself, but I can't call it from SSIS, it gives me a 401 unauthorized error. The web service also uses impersonation of my domain admin account.
I have tried the following things: Setting integrated windows authentication in IIS Setting the NTFS permissions of those web site directories to EVERYONE Using a credential / proxy in SSIS and running it from SQL Agent Changing the log on services of MSSQLSERVER, SQLAGENT, and SQL Integration Services to my domain admin account
I can't get anything to work. What is wrong with this thing? Microsoft's security model has gotten completley out of of hand imo
Also in the security event log it shows all authentication as successful.
Has anyone encountered this error? I get it when I run the installer (c#). I have seen a few posts on google and msdn, but still can't get past the error. I have tried uninstall/resinstalling the parser, registering from the command line, setting the property of the interop to "donotregister" and others with no luck.
Posted the same message to the Service Broker forum. But the board is neither responsive nor active. So I am trying this forum. Hope someone can help.
I would like to call an SSIS package from a Service Broker Queue.
There is one way that I am aware of -
Using xp_cmdshell from within an activation stored procedure and using DTEXEC.
Is there a more elegant way of executing an SSIS package from within SSB?
Also, I am not interested in writing a .NET external activator to process my messages in the queue. I would like this operation to be strictly database oriented. Having said this, I am also trying to avoid triggers processing the messages in the queue.
I would like to call an SSIS package from a Service Broker Queue.
There is one way that I am aware of -
Using xp_cmdshell from within an activation stored procedure and using DTEXEC.
Is there a more elegant way of executing an SSIS package from within SSB?
Also, I am not interested in writing a .NET external activator to process my messages in the queue. I would like this operation to be strictly database oriented. Having said this, I am also trying to avoid triggers processing the messages in the queue.
The Web Service Task seems to support calling methods using parameters but not (as far as I can see) using the Document/Literal calling convention. Is this correct? Is this likely to change in the future?
I am trying to call a SSIS package from a web service hosted on the same machine as the package file is sitting. All that the package does is a simple Execute SQL task with one datasource connection.
I have set impersonation as true. When I run the package from the web service on the virual port (through Visual studio IDE) it runs fine.
I have enabled logging in SSIS. The package log indicates the following:
Failed to acquire connection "APNetDS". Connection may not be configured correctly or you may not have the right permissions on this connection.
Effectively, my web service impersonated account (which is my admin account) is not being authenticated for any of the db connection (uses windows integrated authentication) and I find that odd. To impersonate, I have set the Impersonation to true in the web.config file. The authentication mode is windows.
Please tell me what bit of security I am missing? In case if it helps, the database connection is to my local database and hence should not deny access to my own account. And yes, I think my impoersonation is working because when I debug, the user.identity shows my user id.
When running an integration services package from a windows service I get the "Object ... has been disconnected or does not exist at the server." exception after aproximately six minutes of execution.
This is *not* my windows service failing. I can loop indefinately while tracing to a log file within the service and it will run forever. While calling the mypackage.execute(...) method however, after six minutes (give or take) the exception is thrown...
my code looks something like this: <code> dim foo as Microsoft.SqlServer.Dts.Runtime.Application mypackage = foo..LoadPackage(strimportPkgFilename, pkgevents) results = myPackage.Execute(Nothing, Nothing, pkgevents, Nothing, Nothing) </code>
<error> A first chance exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll Exception in: frmMyForm.DoImports Message: Object '/b76f98a0_5bd9_49d8_a524_eeb49d55b303/bqbhkjnaofq_ifr_cwz+srid_1.rem' has been disconnected or does not exist at the server. </error>
oddly, this same code works perfectly if I run it within a windows form application no matter how long it takes.
It also runs fine if the package can complete in under six minutes.
As part of my SSIS package, a list of sites is created that need to be created on a remote machine. let's say 1000 sites. I need to pass this list to a web service so web service sitting on that machine creates these sites for me. MY SSIS package does not run frequently so I can sacrifice time a little bit to get better functionality.
I need to move the sites that are not created (for any reasons) by web service to another table and successfully created sites to another table, so I need to get confirmation for each site from the web service.
Which option is better?
1) Calling web service for every single record (site) and get the confirmation and then based on the confirmation I move the records accordingly. I know this might be very time consuming, but as I said my SSIS package might only run every six months
OR
2) Sending records to a web service in a batch and get the result. I don€™t know how to do this though.
rst.MoveFirst Do While Not rst.EOF lstEntity.AddItem (rst.Fields(0)), 0 'lstEntity.AddItem (rst.Fields(1)), 1 rst.MoveNext Loop
The Stored Proc is as follow:
Code Block set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go
ALTER PROCEDURE [dbo].[sp_DefaultEntityData] AS BEGIN
SET NOCOUNT ON;
SELECT tblEntities.[Name], tblEntities.PrimaryKey FROM tblEntities ORDER BY tblEntities.PrimaryKey;
END
The table contains 24 entries
As you can see in the VB code, I am trying to read the returned "table" into an Access ListBox. The listbox should display the entities Name but not the Primary key, but the primary key should still be "stored" in the to so that it can be used to access other data.
I have moved the tables from Access to SQL Server 2005, and would also like to port all the sql queries to sp's in SQL Server. The old way for populating the listbox was a direct SQL query in the RowSource property field. I have tried to set the lstEntity.RowSource = rst but it did not work.
Here are my Q's: 1) As what does the SP return when it is called and is there a better way to catch it than I am doing at the moment? 2) How do I read the values into the listbox, without displaying the primary key in die box?
Thank you in advance! Any help is very much appreciated.
Hi, I understand from previous threads that installing SQL Server 2005 Service Pack 2 on the desktop client can speed up the response rate of the Visual Studio 2005 Business Intelligence Tools.
However after logging on as an administrator and installing Service Pack 2, Service Pack 2 returned no errors. However after launching Visual Studio and clicking on the about dialog box the version reported was still €œRTM.050727-4200€? where I was expecting to see €œSP.050727-7600€?.
I understood that I applied the same service pack to my copy of SQL Server on my laptop and the upgrade worked successfully.
Hi there, I,m want to developing Web Service, but can not management database into Service.As anonumous access user, permission, and do not understood Buitinadministrator and ComputerNameadministrator. Because I'm beginer .net .
My Project using C# in VS.NET 2005. .Net FX 2.0 and SQL Server 2005. Who get other idea can introduction to mind. Such as Component it easy in developing.
I have an interesting situation here. I have a SQL Server 2000 database which is attached to SQL Server 2005. The database (SQL 2000) however only has service pack 3 applied. I need to apply SP4 before I can move forward with SQL 2000->2005 upgrade. The question: can I somehow apply this support package with my current configuration or should I install full SQL 2000 front-end anew (which I don't have at the moment)? Whenever I try to run SQL 2000 SP4 it complains "SQL Server 2000 is not installed on this machine."
The server I try to install the update is Windows Server 2003 R2 Standard Edition x64. SQL Server 2000 database itself is x86 (obviously).
SQL Server Reporting Services 2005 Service would not Start on windows server 2003. Working great till yesterday and no changes were made to config file.
Here is the error in Event log
Event Type: Error Event Source: SQL Server Report Service Event Category: None Event ID: 0 Date: 12/13/2007 Time: 8:25:59 AM User: N/A Computer: XXXXXXXXXXX Description: Service cannot be started. Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information. at Microsoft.ReportingServices.Library.ServiceAppDomainController.Start(Boolean firstTime) at Microsoft.ReportingServices.NTService.ReportService.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Here is i found in log files ReportingServicesService!resourceutilities!4!12/13/2007-08:25:59:: i INFO: Running on 0 physical processors, 1 logical processors ReportingServicesService!servicecontroller!4!12/13/2007-08:25:59:: e ERROR: Exception caught loading and setting code permissions policy level: System.Security.XmlSyntaxException: Invalid syntax on line 158. at System.Security.Util.Parser.GetRequiredSizes(TokenizerStream stream, Int32& index) at System.Security.Util.Parser.ParseContents() at System.Security.Util.Parser..ctor(Tokenizer t) at System.Security.SecurityManager.LoadPolicyLevelFromStringHelper(String str, String path, PolicyLevelType type) at System.Security.SecurityManager.LoadPolicyLevelFromString(String str, PolicyLevelType type) at Microsoft.ReportingServices.Library.ServiceController.SetAppDomainPolicy() ReportingServicesService!servicecontroller!4!12/13/2007-08:25:59:: e ERROR: Error Starting Service: System.Security.XmlSyntaxException: Invalid syntax on line 158. at System.Security.Util.Parser.GetRequiredSizes(TokenizerStream stream, Int32& index) at System.Security.Util.Parser.ParseContents() at System.Security.Util.Parser..ctor(Tokenizer t) at System.Security.SecurityManager.LoadPolicyLevelFromStringHelper(String str, String path, PolicyLevelType type) at System.Security.SecurityManager.LoadPolicyLevelFromString(String str, PolicyLevelType type) at Microsoft.ReportingServices.Library.ServiceController.SetAppDomainPolicy() at Microsoft.ReportingServices.Library.ServiceController.StartService(Boolean firstStart)
In the last step of installing the SQL Server 2005 Express edition I get the following error:
Doing Action: Do_sqlScript PerfTime Start: Do_sqlScript : Thu Jun 21 19:38:35 2007 Service MSSQL$SQLEXPRESS with parameters '-d"c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLTemplate Datamaster.mdf" -l"c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLTemplate Datamastlog.ldf" -m SqlSetup -Q -qLatin1_General_CI_AS -T4022 -T3659 -T3610 -T4010' is being started at Thu Jun 21 19:38:35 2007 Service failed unexpectedly (1814) Error Code: 0x80070716 (1814) Windows Error Text: The specified resource name cannot be found in the image file. Source File Name: sqlsetuplibservice.cpp Compiler Timestamp: Wed Jun 14 16:29:04 2006 Function Name: sqlservicetart Source Line Number: 301
Do_sqlScript SqlScriptHlpr Start service MSSQL$SQLEXPRESS
Error Code: 1814 MSI (s) (80!08) [19:39:58:265]: Product: Microsoft SQL Server 2005 Express Edition -- Error 29503. The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually." The error is (1814) The specified resource name cannot be found in the image file. .
Error 29503. The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually." The error is (1814) The specified resource name cannot be found in the image file. . <Func Name='GetCAContext'> <EndFunc Name='GetCAContext' Return='T' GetLastError='203'> Doing Action: Do_sqlScript PerfTime Start: Do_sqlScript : Thu Jun 21 19:39:58 2007 Service MSSQL$SQLEXPRESS with parameters '-d"c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLTemplate Datamaster.mdf" -l"c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLTemplate Datamastlog.ldf" -m SqlSetup -Q -qLatin1_General_CI_AS -T4022 -T3659 -T3610 -T4010' is being started at Thu Jun 21 19:39:58 2007 Service failed unexpectedly (1814) Error Code: 0x80070716 (1814) Windows Error Text: The specified resource name cannot be found in the image file. Source File Name: sqlsetuplibservice.cpp Compiler Timestamp: Wed Jun 14 16:29:04 2006 Function Name: sqlservicetart Source Line Number: 301
Currently i am using SQL server 2005. Since the begining i am facing sqlserver service shutdown problem. Normally it happens in every 2-3 days and sometimes happens twice a day. It halts all the banking operation. After starting MSSQL SERVER service, the system goes online.
Following is the error message recorded in the event viewer. --------------- SQL Server is terminating because of fatal exception c0000005. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. Check the SQL error log for any related stack dumps or messages. This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart). ---------------
Please tell me what steps i should take to resolve it.
We are using SQL Server 64 bit edition and windows Server 2003 Server. Sometimes, the SQL server takes most of the CPU time (99 to 100 %) and memory (7 + GB out of 8 GB RAM) and would not respond to user request. At this point of time, we would not be able to connect to SQL server/execute any query using the existing connection or start/stop service. This continues for 15 mins to 4 hours and after that it started working nicely. I could not find any information in the event viewer. When this happened, I have checked our processing log that none of the job/queries related with the application is running on our SQL Server. This happens once in 3 weeks or sometime once in 2 weeks.
In one of our application log, at point of meltdown I€™ve got the below message.
[Microsoft][ODBC SQL Server Driver][SQL Server]Time-out occurred while waiting for buffer latch type 3 for page (1:647040), database ID
Since this our production server, users across the world are getting frustrated.
I couldn€™t find any information related to his in any website
I participate in the SQL Server Integration Services and Reporting Services forums and I have seen many outstanding issues users would like to see fixed. Is there a SQL Server 2005 Service Pack 3 being developed and if so when would it become available?
SQL Server 2005 a lot of time hangs. Any advice is highly appreciated! Please have a look at the error log from this link http://download.yousendit.com/B787CBD235FC2417
Is there no "passive" install mode for SP1 (gui but no user input required)? I can run unattended using the /quiet switch but this gives me absolutely no feedback as to progress or success/failure of the install. It also returns to the command prompt immediately whilst kicking of msiexec in the background, meaning I can't trap any errorlevel. How are we supposed to check success or failure in applying the SP for unattended installs? For rolling this out across an enterprise we need something, usually hotfix.exe has a passive install mode.