I just try to implement the 3 tire architacture. So, I developed the one web project for web ui and one web service and one dall project in one solution.
On dll project put the bll, connect to sql server and return the result set to web service.
Form web service, get the result from dll and transfer to web ui.
When I call class from dll, i just overrid the connection string.
Actually it's wrok properly in my development pc and in my local webserver.
As our usual, when i publish to real web server i got the following error.
Server was unable to process request. ---> An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Anybody plz help and direct how should i fixed this problem.
My webservice is suppoed to insert a row into my SQL server database. Al columns are varchar(String). When we insert with digits everything is ok, but when we try letters as parameters i get this error message:
"An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
Additional information: Server was unable to process request. --> The name 'Bob' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted."
I have a webservice set up on the same box where my SSIS packages sit at. I have an ASP.net app which calls the webservice. The webservice in turn invokes the ssis package and , I run it on file system.
i keep getting this error
System.Web.Services.Protocols.SoapException was unhandled by user code Message="Server was unable to process request. ---> That assembly does not allow partially trusted callers." Source="System.Web.Services" Actor="" Lang="" Node="" Role="" StackTrace: 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 CallDummyWebServ.com.bls.cmndev2.LaunchSSISPackageServiceCS.LaunchPackage(String sourceType, String sourceLocation, String packageName) in D:ProjectsCallDummyWebServCallDummyWebServWeb Referencescom.bls.cmndev2Reference.cs:line 78 at CallDummyWebServ._Default.btnSayHello_Click(Object sender, EventArgs e) in D:ProjectsCallDummyWebServCallDummyWebServDefault.aspx.cs:line 26 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I tried to set up the impersonation on both the asp.net 2.0 config and web.config .. but the problem is stil haunting me .. any help or suggestions would be greatly appreciated.
When our production site was deployed on the client's WinServer2003, my webservice is throwing a "server does not exist or access denied" exception. I'm using the same connection string (typed once) as i'm using in my web forms on the user visible sections of the site. the service also works fine on my XP testing machine. unfortunately, I'm not a 2003 admin. If anyone can help, i would greatly appreciate it, trying to find what is misconfigured on the client's server is driving me bonkers.
I am new to both Reporting Services and Webservices implementation so I am just trying to use a simple example. I found a Webservice on the internet that returns movie information:
I want to update data on the device which has a sql server mobile database.
the main database is sql server.
I use web services to enable the mobile application to access the server.
Can anyone recommend a way of updating the data on the device without using replication? I basically want to read a dataset from the server via webservice and put this in to local db - but not row by row as too many records.
I'm having a problem connecting with a Java application but I CAN connect using my .Net application - the user name and password are the same for both (using the same database on SQL Server Express 2005).
The error I get is: "com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "CORNERS" requested by the login. The login failed." An interesing note - I get the same message if the database is not running.
SQL Server Express 2005 is installed in mixed mode.
Here is my connection string in the .Net appplication: <add key="connectString" value="Server=(local);UID=sa;PWD=myPasswd;Database=CORNERS" />.
hi after connecting webservice with my vs.net2005 using sqldatasource in webservice for getting data's ,i faced following errors:- System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Unable to cast object of type 'System.Data.DataView' to type 'System.Data.DataSet'. Code which i used in Webservice is as follows:- <WebMethod()> _Public Function getData() As DataSetDim ds As New DataSet
Dim sds As New SqlDataSourcesds.ConnectionString = ConfigurationManager.ConnectionStrings.Item("HRMSConnectionString").ToString sds.DataSourceMode = SqlDataSourceMode.DataSet sds.SelectCommand = "select * from EpmEmployeeDetail"ds = CType(sds.Select(DataSourceSelectArguments.Empty()), DataSet) Return ds End Function
I created a custom DTS object that does its work by calling awebservice. When you create the object in DTS, it lets you set theuser/pw you want to use to authenticate to the webservice. The problemI am having is that once I authenticate to the webservice within DTS,it always uses the same authentication when contacting the service.So, for example, I drop a new instance of my object into a package. Itconnects to the webservice as me. I set up the parameters of the task,including telling it to connect as User="test". If I run it, my codesets the credentials correctly on the webservice, but the webservicestill gets called as me.If I exit out of SQL Server and go back in, and run it, it correctlyconnects as User="test". But then if I try to edit the task, and givemy own user and password, it still always tries to connect as "test".It seems whoever I initially connect to the webservice as, that is theinformation that DTS will use for the entire session.Is there any way to do what I want to do?thanks
I have a webservice that I would like to call from SQL Server 2005. I have done alot of testing and am pretty familiar with how CLR works and how to create assemblies in SQL. My problem is that I don't know much about .net and am not sure what kind of project I need to create in Visual Studios to accomplish calling the webservice. I've tried googling and have not found much that is of use to me.
I need to populate a table B by selecting a from table A but for every single record selected from Table A for some of the feilds i need to pass it to a WCF webservice and do some tasks.
Can somebody show me an example of this i am completely clueless on how to invoke a WCF webservice for every single row fetched from a database.
After creating a WebService using SQL Server 2005 HTTP Endpoints I can only browse to the wsdl file using localhost address and not via the machine name
For example http://MACHINENAME/SomeWebService?wsdl will ask for some authentication that can never be determined while
http://localhost/SomeWebService?wsdl will successfully generate the WSDL file
This happens on the actual machine and on all other machines in the domain which pretty much defeats the purpose of using Web Services to expose functionality.
Does anyone have any idea regarding
(a) what security features are at work here, (b) Where are they documented (c) How to set or use them in such a manner as to actually be able to use web services.
While investigating I have noticed that all examples conveniently use localhost and so either avoid or never address this issue.
I have noticed what seems to be a bug in Reports using an XML Webservice for a datasource.
I have the data source setup and working to query an XML webservice. All fields aren't always populated - so after the intial step that automatically builds your dataset and sets up the field names - I went in and manually added the remaining missing fields (which were blank).
Then I setup the report - dragging/dropping fields from the dataset.
I thought everything was working fine, UNTIL i noticed that IF the FIRST record contains ANY blank fields - ALL of those fields (on every record returned) show blank on the report.
For example my webservice might return something like this:
But when my report actually runs, it doesn't show any value for the second record:
My Report Child_Name Child_ID Joe Tim
In this case, Tim should actually show the Child_ID value, but apparently because the first record didn't have a value - the report assumes NO RECORDS will have a value and doesn't bother printing them.
But if I run the report so that the first record DOES contain that field - then everything seems fine.
I can see that my Dataset hasn't changed - as it still contains all the fieldnames (even the ones that sometimes return empty).
Is it possible to call/fire a method in a webservice (.asmx) from a trigger in MS SQL 2005? I would like to send out a notification to all the admins whenever a new row is inserted into a table in our db. If possible, can someone show me an example of how to?
Is there any way to delete folder in reportserver using RS webservice API? I know there is a method: DeleteItem ( Item As string ) But I tried it and it didn't work for folders. Thanks
I want to use ReportViewer Control to show the data. Can I render report using Sql Server 2005 Reporting web service call. I didn't get any sample which allow me to host report on reporting server but view them using ReportViewer Control using webservice call rather than using URL.
I need to hide Reporting server URL location. And If you show report using ReportViewer Control using URL mechanism, anybody can see the report server url.
I have written a SQL CLR procedure, which will be invoking the webservice..I developed the application locally and it works fine, I am able to invoke the webservice using the SQL CLR procedure present in my database. But when i hosted the webservice in App server and executed the SQL CLR procedure in DB Server. From DB Server, I am not able to invoke the webservice present in the app server. But i am able to browse the webservice from my db server. I am getting the foolowing error message
A .NET Framework error occurred during execution of user defined routine or aggregate 'usp_LoadView': System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond System.Net.Sockets.SocketException: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) System.Net.WebException: at StoredProcedures.usp_LoadView(String ConnectionString, String WebserviceUrl, String ColumnMappingsXml, SqlXml AddressXml, SqlXml& ExceptionSqlXml, Int32& ErrorStatus)
I goggled and tried out various options, like increasing €œwebservice timeout€? and increasing €œexecutiontimeout€? for HttpRuntime, but none seems to be working. Please provide me your suggestions to how to fix this..
We have a package that runs a webservice. The webservice connects to exchange for multiple mail accounts so it sometimes takes awhile to run.
If run from SQL Server Management Studio, it usually completes, but may occassionally time out.
If run from a job (i.e. we want this scheduled) then it NEVER completes successfully - althought there is very little information about what the error was. It seems to fail too quickly to be a time out error...
Any idea why this is happening? Or how to prevent it from timing out? Is there a way to initiate the webservice asynchronously from SSIS?
I created a method in the webservice which will take productid as input parameter and return the product number, productname, and vendor account number and vendor name. I was able to run the web service successfully. And also created the assemblies and sp using these assembly.
At the final execution i am getting some security exception
EXTERNAL NAME GetProductVendorAssembly.StoredProcedures.CallWebService
GO
EXECUTE GetProductVendorDetails 2
Msg 6522, Level 16, State 1, Procedure GetProductVendorDetails, Line 0 A .NET Framework error occurred during execution of user-defined routine or aggregate "GetProductVendorDetails": System.InvalidOperationException: There is an error in XML document (1, 281). ---> System.Security.SecurityException: That assembly does not allow partially trusted callers. System.Security.SecurityException: at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ProductVendorInfo(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read9_Item() at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer5.Deserialize(XmlSerializationReader reader) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) System.InvalidOperationException: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) 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 CLRWebServiceProject.LocalWebService.ProductVendorInfoService.GetProductVendorDetails(Int32 ProductID) at StoredProcedures.CallWebService(Int32 ProductID) .
// String ProductVendorDetail=""; //Set the connection string for the database string connectionstring = "Server=PC013584;Database=AdventureWorks;User=Raj;Password=password"; //Create Connection and open it SqlConnection conn = new SqlConnection(connectionstring); conn.Open(); //Create the command object SqlCommand comm = new SqlCommand(); comm.Connection = conn; comm.CommandText = "SELECT P.ProductID as ProductID,P.Name as ProductName,P.ProductNumber as ProductNumber,V.AccountNumber as VendorAccountNumber,V.Name VendorName" + " FROM Production.Product P " + " INNER JOIN Purchasing.ProductVendor PV ON (PV.ProductID = P.ProductID) " + " INNER JOIN Purchasing.Vendor V ON(V.VendorID = PV.VendorID) " + " WHERE P.ProductID =" + ProductID.ToString();
using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; using Microsoft.SqlServer.Server; using CLRWebServiceProject.LocalWebService;
public partial class StoredProcedures { [Microsoft.SqlServer.Server.SqlProcedure] public static void CallWebService(int ProductID) { // Put your code here
ProductVendorInfoService S = new ProductVendorInfoService(); S.UseDefaultCredentials = true;
We have a large number of applications that use various sql databases. They need to validate and do lookups of information such as employees and addresses. Currently, we load data from oracle into our main sql server and push the data out to various servers. This could perhaps be simplified with replication, but is now done with some dts packages.
We are wondering if there could be a better way to do this. We would like to go directly against oracle for the address data and to sql for the employee info.
An idea I had was to have our programmers create a web service that could be called from our .net applications. That works fine for in house applications, but some vendor applications need to see a table or view. We can write a CLR proc that can connect to the web service and provide data in table format I believe.
How could we get this into a view? I've tried creating a function that calls the proc and returns the table-valued variable to the view, but it seems the functions doesn't like using 'exec myProc' in the select_statement parameter.
I suppose we could have them make an additional connection to the lookup information, stored on a central database...they are probably doing this anyway to get to the validation db on the same server.
I'm trying to call an external webservice which use https and certificate. I load certificate into MSIE and then made *.cer file. The problem is that if I compile simple console program which use this certificate - than all is OK. But when I compile simple rutine for SQL server and trying to run it - an exception is issued after this line:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I have a webservice task which calls a method ( C#) that returns a bool, so i declared a variable in my package of type boolean and set the output of the webservice task to this variable. When executing the task it fails with:
[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The type of the value being assigned to variable "User::WebserviceResult" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. ---> System.Runtime.InteropServices.COMException (0xC001F009): The type of the value being assigned to variable "User::WebserviceResult" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariable90.set_Value(Object pvValue) at Microsoft.SqlServer.Dts.Runtime.Variable.set_Value(Object value) --- End of inner exception stack trace --- at Microsoft.SqlServer.Dts.Runtime.Variable.set_Value(Object value) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.saveOutputToVariable(Object output) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.saveOutput(Object output) at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
so i changed the Datatype of my package variable to String... the task then succeeds, but the Variable is empty?
Edit: i changed the return type of the webmethod to int and tried to receive the return value into int16, int32 and int64 package variables.. none of it worked...same exception as above