WCF / ASMX :: Unmanaged Dll Called From Webservice?
Sep 17, 2010
I have a webservice that wraps an unmanaged C++ dll. I'm wondering how I should handle state and multiple connections? I'm thinking that the unmanaged dll will be shared across all connections...is this the case? Note that I am using a shared host so I have limited abilities to modify IIS specifically. If the unmanaged dll is not shared and will have a unique instance for every connection then I have nothing to worry about. If it's the case it's shared then I guess I will have to persist the unmanaged state on a per-connection basis through a DB?
View 1 Replies
Similar Messages:
Dec 7, 2010
I've inherited a half completed application that seems to use a model that I'm not sure can reliably work.It is a ASP.NET webservice that on each call loads a unmanaged C++ .DLL using
[DllImport ( "kernel32.dll" , EntryPoint = "LoadLibraryA" )]
public static extern int LoadLibrary( string lpLibFileName );.
[DllImport(@"MyUnamanagedDLL.dll")]
public static extern string DoStuff( );
In the unmanaged C++ .dll it is using a singleton to hold state between calls.This is so that it only has to initialise once and load a bunch of slow stuff from disk and database rather than on each webservice call as this is too slow.
View 3 Replies
Feb 24, 2011
I am new to ASP.NET (2 months) and my very first assignment is to create a website for a municipality. Purchasing as much reading material as possible, I got started and after some time, I have a decent website (coded in C#) that is ready to be internally tested on the departmental webserver. The Web server is running IIS 7 and the pages were developed with Visual Studio 2010. On the main default page, I wanted to implement a slide show using the AJAXControlToolkit which I installed. I watched the ASP.net tutorial [URL] and literally coded my slide show verbatim. I try to launch my slideshow within my default.aspx page and absolutely nothing happens. The steps that I took are
1. Created a webservice (SlidesService.asmx) which generated a code behind file (SlidesService.cs).
2. I created the web method GetSlides() containing a 22 element array which I place in the code behind file.
3. Implement the ToolkitScriptManager establishing my image control.
4. Defined my Previous, Play and Next buttons.
5. Implemented my SlideShowExtender providing my SlideShowServicePath and SlideShowServiceMethod.
Assumptions: In doing all of the above, I noticed that the SlidesService.asmx file needs no code (as I placed all code within the codebehind file). The SlidesService.cs code behind file should reside in the App_Code folder whereas the the SlidesService.asmx file can remain in the root folder. No Button e.g Button_Click needs to be attached to the code behind source file. If I have conveyed my steps properly, can anyone shed some light on why when clicking the play button, nothing happens? Code is listed below.
[Code]....
SlidesService.asmx - code
<%@ WebService Language="C#" CodeBehind="~/App_Code/SlidesService.cs" Class="SlidesService" %>
View 2 Replies
May 25, 2010
I want to call a webservice using jQuery.ajax() but the webervice doesn't get called. - If I change the url: to reference a .ashx file it gets called but not .asmx?
Here's the code I'm using:
jQuery.ajax({
type: "POST",
url: "/services/CheckUsername.asmx/CheckUsername", // this doesn't get called
//url: "/services/CheckUsername.ashx/ProcessRequest", this gets called
data: '{ "context": "' + "username" + '"}',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (msg) {
alert("Result: " + msg);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("Error: " + textStatus)
}
The .ashx file gets called but a parsererror is retuned because it's returning http context - how can I modify this to get a string return type from a webservice?
View 2 Replies
Nov 10, 2010
On my page I have a dropdown for country.
On my asmx service I want to get the value of the dropdownlist to filter the next input which will be state/providence.
My code on the asmx:
[Code]....
I want to add another clause to the WHERE statement to restrict Country = @Country so I will need to get that value to the web service.
View 2 Replies
Feb 24, 2011
I have datatable consist of 20 records and i want to bulk insert into sqlserver through the asmx webservice. Can anybody guide to me or provide Sample BusinessLogic and webservice code.
View 1 Replies
Oct 31, 2010
How do I protect a webservice if it is called from ajax ?
Update: I realize that my question didn't reflect what I intended to ask. I don't want user to be able to do the request by pointing to it with its webbrowser but only in the context of my app.
View 2 Replies
Jan 19, 2011
I have a problem with custom authentication over https. What I need is a secure channel and authenitcation on message level. I got it working quite well, but my custom validator never gets called when I send a message to the web service using SoapUI. The service is called, however the Validate method in the custom validator is never called. The validator is available for the runtime, I have checked by misspelling the type in customUserNamePasswordValidatorType which caused an exception saying it could not find type when I accessed the WSDL.
Here's my config:
[Code]....
View 3 Replies
Aug 27, 2010
Service Function Getting Called Twice?
View 1 Replies
Nov 3, 2010
I have spent a couple of days on this one. I have an ASP.NET website that has Linkbuttons on
the Default.aspx page.. I added a WebService to the Website because later on the WebService will
subscribe to a Provider(Feed) of News, Sports and Weather and things like that. So when a Linkbutton
on the Default.aspx page is clicked it will connect to the link in the WebService which will load the News,
Sports or Weather onto the Default.aspx web page.
The problem is I can't get the LinkButton to execute the Link in the WebService. The link will call the page up
to where you see all of the Web References. But then if you want to execute one of those references you
have to click its link and the Invoke button that will follow. My questioh is how can the link on my Default.aspx
page execute the link in the WebService. Now I changed the LinkButton into an <a href> but I still can't execute
the link in the WebServices. I always use www.Microsoft.com as the link when testing and I wasn't sure about the return type
so I put "void" for an HTTPRequest, so below is the link from the Default.aspx web page and below that is he asmx file:
[code]....
View 2 Replies
Nov 4, 2010
I have created a web service. When I check the service directly from it's web page it works correctly. Here's what the code looks like:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Configuration;
using System.Runtime.Serialization;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using System.Runtime.Serialization.Json;
using System.IO;
using System.Text;
using Microsoft.SharePoint;
using System.Collections;
namespace MDA.WebParts.SPRolodex_Web_Service
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService()]
public class SPRolodex_Web_Service : System.Web.Services.WebService
{
public SPRolodex_Web_Service()
{
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public bool ListExists(string personalUrl, string listName)
{
try
{
SPSite mySite = new SPSite(personalUrl);
SPWeb web = mySite.OpenWeb();
SPList list = web.Lists[listName];
return true;
}
catch (ArgumentException)
{
return false;
}
}
}
}
However, when I call the method using ServiceProxy.js (a jQuery based library) I get this error
"Only Web services with a [ScriptService] attribute on the class definition can be called from script."
As you can see the class has the ScriptService attribute and the methods have the ServiceMethod attribute.
View 1 Replies
Apr 24, 2010
I am using PHP web service in dot net [URL]I set the name of web service as Test but when I am trying to access object test I was not able to use that, is there is any other method to use PHP webservice.
View 1 Replies
Jul 9, 2010
I was looking for an asp.net webservice that uses .net 4.0 but everytime I choose 4.0 the webservice choice goes away.Someone suggested to me that maybe they(MS) want you to use WCF instead. I don't know much about it but he said they are like webservices but better. So anyone got a comparisons guide?
View 3 Replies
Jan 28, 2011
Any body knows How to use webservice ? using Get & Post method...
View 3 Replies
Oct 29, 2010
I have certificate(abcd.rar) , which I need to include when I call that web service from asp.net application, Some one tell me how do I implement certificate into my application, certificate is with file extention .rar
View 3 Replies
May 28, 2010
How can I deploy my Web service on IIS 6.0 ?
I create a web service with VS 2005 on the local IIS, now I must deploy it on an intranet with IIS 6.0.
how to deploy this one one in production server.
View 2 Replies
Nov 4, 2010
I have deployed a webservice on my machine.
Now i want to configure ssl on webservice.
View 5 Replies
Sep 17, 2010
I'm calling an asp.net webservice from a VB.Net application.Is there any way to determine in the webservice that it was called from a specific application. I had a look at Me.Context.Request but I can't see anything that refers to my VB app.
View 1 Replies
Nov 3, 2010
try to guide how to call web service in my asp.net Application. I had Web reference of that web service.I added the Service to my application.i created name space and I try to use methods inside the web service it showing unable to connect server machine. I want to Use jangomail services from asp.net application. my application need to send mass mailing using jangomail service.when i try to access that web service( http://api.jangomail.com/api.asmx) it giving Some Error like Connection failed to
View 4 Replies
Sep 8, 2010
I have console application that sends http request to asp (classic asp).
The asp sends http request to web service.
How can I debug (break points) the WebService?
View 1 Replies
Dec 18, 2010
How to Create WCF Webservice How to Host. How to access. how to transfer data.
View 3 Replies
Sep 1, 2010
Facing an issue with the web service calls written in Java.When am trying to call webservices written indexer Java from my machine its takign ages to respond back.same URL when typed indexer explorer fetches abstract response immediately.if tried on other system and code seems to work find so no issue with the code.unable to figure out what could be the issue while accessing the same from my box?
View 4 Replies
Jun 29, 2010
How to debug a web service localhost after hosting the webservice in IIS
i am not able to find a solution how to debug a web service locally . ie
i am not able to put a breakpoint in afterdeserialize and before serialize method
can any provide a sample code..
Any help
View 6 Replies
Oct 21, 2010
I'm trying to connect to a webservice but my experiens of webservice i limited
Code]....
The values that I would like to getis:carWorkOrderInfoResult.areaIdcarWorkOrderInfoResult.workOrderNumber
View 2 Replies
Sep 17, 2010
Ive created a webservice that returns an xmldocument
[WebMethod]
public XmlDocument Invoke()
{
//code here
}
when I add a webreference to a consuming project, the return type is classed as XMLNode, anyone know why?
View 1 Replies