VS 2008 : Expose HTTP Access To A Background Service?

Dec 16, 2011

I'm creating an executable that will run as a background service.I want to communicate with this executable with a browser - similar to how you talk to sophisticated copiers in a big office.and was told to build an HTTP interface in that app.All the examples of httprequest and httpresponse I can find are about talking to web sites - or public services.How would I go about having my app "fire an event" when an async POST is made from a browser page? How do I wait on a port in the app?

View 1 Replies


ADVERTISEMENT

Why Not Expose List (Of String) In The Parameters Of Web Service

Dec 9, 2009

The FxCop says in a rule that generic List should not be exposed to the outside world.But I do not understand why and what is the replacement for the generice List? url...

View 4 Replies

.net - Expose WCF Service Cannot Retrieve Object Through Windows Firewall?

May 13, 2011

I built a WCF service that exposes itself for a web application, it accepts an object and prints the data on the clients machine. Works fine on my development machine, and the service is up and running on any machine i install it on. I can enter ip address in clients machine web browser and see it is running. Problem is when i send the object to the clients machine it returns an error, that sounds like it could be because of the clients windows firewall. Where would i start at to deal with this problem ?There was no endpoint listening at http://192.168.1.168:2202/PrintLabel that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

View 1 Replies

.net - Send HTTP Auth Credentials With A WCF Service Reference

Sep 4, 2009

I'm attempting to consume a HTTP Basic Auth Secured PHP WebService using VB.NET. I've so far managed to get 100% perfect integration by adding it as a Web Reference and doing the following:

Dim Credentials = New System.Net.NetworkCredential("username", "password")
Dim CredentialCache = New System.Net.CredentialCache()
CredentialCache.Add(New Uri(MyWebService.Url), "Basic", Credentials)
MyWebService.Credentials = CredentialCache
MyWebService.PreAuthenticate = True

I can also successfully add the webservice as a 'Service Reference' and this also works fine, as long as i turn off all HTTP authentication on the SOAP server.

My problem is that I can't find any documented means of sending basic HTTP Auth Credentials when using Service References as opposed to 'Web References'

Am I right in my understanding that 'Web References' are a legacy method of Web Service consumption?

View 1 Replies

Web Service Failing With The Request Failed With HTTP Status 401: Unauthorized?

Apr 23, 2012

I have a very long running task I need to take from my website and put into a web service however every time I try call the web service I get this error message The request failed with HTTP status 401: Unauthorized.

View 1 Replies

HTTP 404 Not Found Error On Web Service Call, Only With Large Amount Of Data

Sep 2, 2011

I have a vb.net Windows application that calls a vb.net Web Service function. Both the vb.net application and Web Service have been in use for over 5 years and have worked well. The Windows App builds a text file consisting of a number of inserts into an Oracle table, followed by a call to an Oracle package. The Web Service call uploads the text file to the Web Server, loops through the statements in the text files and executes them. It then does a Select statement to put the resultant data in a string which is passed back to the calling program. We have both people on our local area network as well as external users where the call to the Web Server is over the internet.

The data string returned is the pricing for each of the lines inserted in the text file, separated by asterisks. Normal use of this call has anywhere from 1 to a few dozen lines, and the program works fine for this for both internal and external users.

Our problem right now is one external person is attempting to price a job with 491 individual line items. At first it would not price, whether the job was priced from a computer at the customers site or one of our internal people on the LAN. The problem turned out to be the timeout value was not long enough (it was set at 2 minutes, this job takes 5 minutes) so changing both the Timeout value in the Web Service call as well the httpRuntime executionTimeout value in the web.config file on the web server addressed the problem, but only for our internal users on the LAN. Our external customer wants to be able to price jobs of this size going forward, and I am at a loss as to why it errors on internet connected machines but not locally connected machines. Our customer is in New York, We are in Wisconsin, and I am able to recreate the error condition from my home computer.

The other thing is, if I create a VPN connection to our server from my computer at home, this job will price (again, it takes about 5 minutes) but if I disconnect the VPN connection, it gets an error after approximately 3 minutes, http 404: Not Found.The customer can otherwise price all of his other jobs with no problems, it's only this one, very large job that gets the error.

View 4 Replies

Web Service To Deserilize JSON Http Request - Pass To Stored Procedure To Retrieve Data From SQL Server

Aug 23, 2011

I have a task to create a web service to receive client-side app's http request(with rpc={json data} in the end), deserilize it and put he parameter in stored Procedure in order to retrive data from sql server. the procedure query and client-side's app are already there and the return data to client-side app is JSON too

View 1 Replies

VS 2008 Making Property In A Class Expose An ENUM?

Jul 12, 2009

I've got this in a public module

Module PublicModule
Public caseBAL_C As caseBAL
Public clientBAL_C As clientBal
Public Enum CSFlags

[Code]...

It doesn't like the Public Property StateFlag() As CSFlags -it's saying that CSFlags

'StateFlag' cannot expose type 'PublicModule.CSFlags' outside the project through class 'caseBAL'.

View 2 Replies

Asp.net - Access To Textbox On Http Handler?

Feb 3, 2011

I'm trying to use the MultiUpload flash script on my ASP / VB.NET project and, to upload a file (following the instruction available on [URL].. I created an HTTP Handler. It works fine but, at this point, I need to read a value from a ASP:Textbox available on the caller page. How can I read this parameter?

View 2 Replies

Use BITS (Background Intelligent Transfer Service) In Program?

Aug 23, 2009

On the site below they tell me how I can use BITS (Background Intelligent Transfer System). The only problem is that the Microsoft.Msdn.Samples.BITS namespace doesn't exist in Visual Basic Express Edition. Does Anybody know how I can use bits using vb.net?

View 2 Replies

Access HTTP Requests Made By Web Browsers?

Jun 2, 2012

In VB.Net, how do I make a program to tap into the HTTP requests made by external web browsers? I don't want to edit or stop the headers, only 'read' them, i.e., access its contents. I'm speaking of something like Fiddler2, but I only want the 'reading' part. I also want to read the user-agent.

View 1 Replies

WCF Service Running A Background Thread To Speed Up Execution Time

Nov 14, 2011

I have a per-call WCF service that serves a number of clients. I'm looking to speed up the services by running some background processes so they don't block or slow down the main function of the services.

One example is that the main function needs to return a set of data, while the background thread needs to record some statistics based on the parameter(s).

Code:

Public Function GetAccountDetails(id As Integer) As AccountDetails
Dim retVal As New AccountDetails
Dim a As New Accounts

[Code]....

If I use this background thread to record the statistic it doesn't block the main thread from returning the data to the client.

It's been working well in test scenarios, but my question is, are there any dangers with leaving this thread to execute without Joining it before returning the data to the client? Could there potentially be any loss of statistic data? Could there be potential memory problems on the server side?

View 1 Replies

HTTP Client Component For Communicating With HTTP Servers

Jan 17, 2009

Anyone know anymore .DLL Files that are like this?

HTTP client component for communicating with HTTP servers. [URL]

Im looking for something that acts like Web Browser Control But it is not. It should be like HttpWebRequest Class But handle the stuff properly like a Web Browser Control Does.

So i found Chilkat HTTP .NET

View 4 Replies

Regex - Extracting HTTP Link(http://) For The String In .NET?

Sep 28, 2011

I have the following column values in my table Sample values:

[URL]

I want to have 2 variables having the links and content separate - example:

[URL]

I guess it can be done via String functions or regular expression.

View 2 Replies

BITS - Background Intelligent Transfer Service - Convert Each Class In The SharpBits.Base Folder

Apr 8, 2009

Has any one used BITs in VB.NET? If so, do you have code samples? I was looking at SharpBits but I have a VB project that I wanted to use BITS for. Is it possible to use it with my VB.NET program? (.NET 2.0) I was tempted to try to convert each class to VB.NET in the SharpBits.Base folder but figured I'd ask in case someone has headed down this route before.

In case you run across this question. What you can do is in the Sharpbits.Base folder (that you download from codeplex) there is a DLL you can reference in the Bin directory. You can add that into your references to access it. Marking Konrad as answer since he was kind enough to post.

I managed to get sharpbits working with some quick code which I pasted below for anyone who might stumble upon this question. Like I mentioned above add the DLL to your project.

Dim b As New SharpBits.Base.BitsManager
Dim mynewjob As SharpBits.Base.BitsJob = _
b.CreateJob("jobname", SharpBits.Base.JobType.Download)
mynewjob.AddFile("\servershareigfile.zip", "c:igfile.zip")
mynewjob.Resume()

You'll need to write some logic to check for the status of the job. Once it hits "Transferred" status you can then mark it as complete. This will write the file from a .bin to the file name you listed. Something that helped me was installing the Windows Support Tools (you can get it from a Windows 2003 Cd/DVD in the sup tools folder)and using Bitsadmin.exe to view the status of the job while debugging.

View 2 Replies

VS 2008 Expose "Stop" Properties In Route Class?

Jan 17, 2010

I have two classes clsRoute and clsStop. Each route has a collection of stops. So I created a Stops collection in the route class and a method to add stops and remove stopsThis seems to work for me. owever, the clsStop properties that I declared are not showing in intellisense.i.e. oRoute.Stops.item(i).StopName and oRoute.Stops(i).StopName

Public Class clsStops
Private _stopNumber As Integer = 0
Private _stopName As String = String.Empty

[code].....

View 4 Replies

Using Background Intelligent Transfer Service To Transfer Files To Server?

Mar 20, 2012

I will use the Background Intelligent Transfer Service (BITS) to transfer files from a client (laptop) to a shared folder on a server within our local network.The problem is a very slow network bandwith, if we transfer a file, the other clients canīt work, all requests to other clients (application) or viewing internet pages needs a long time.My idea is to use BITS in my tool to copy/transfer a file from client to server, also I hope to get more performance for the internet requests.

View 2 Replies

.net - .NET XML Web Service, Consuming Class Not Able To Access Web Service Class?

Mar 21, 2012

I am creating a simple XML web service and have run into something I can't quite explain.My web service class has the following structure :

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel

[code]....

Invoking my method using the built in VS web service test harness works fine. I created another project, in another solution, to test consuming the web service. I added a web reference to my project and set it so I could reference my web service by using "localWS". Then in the page load event of my consuming class I tried to instantiate an object of my web service:

Dim srv As New localWS.MyWS

But there was no "MyWS" type found. There is however a localWS.MyWSSoapClient class. When I use it I can invoke my web methods. My question is, why can't I create a straight up version of MyWS class? In the tutorials I'v read, and in the book I have, example consuming classes for .NET XML web services can instantiate objects of the web service class they are consuming. As a further test I added a new web form to my web service project and from there I was able to instantiate a MyWS class.

View 1 Replies

New Member With MS Access Background?

Aug 2, 2009

I'm a newbie to this forum and want to make sure I don't muck things up and irritate everyone as tends to occasionally happen in some forums.I have a very solid background in MS Access (I use it as a front end to an Oracle database and use DAO methods to create native Oracle statements via pass through queries). I am going through the tutorial on VB 2008 Express download the MS site. I have a number of questions that generally have to do with "I did this with VBA in Access, how do I do the same here?"

View 4 Replies

HTTP Post With Vb 9.0 (2008)?

Mar 5, 2010

I'm coding in vb.net, and I haven't in forever so I'm a little rusty now.I want to be able to post data to a website, it can be anything as long as it can call the url (without being in a browser).[URL]

View 1 Replies

Access Data From A Background Thread?

Oct 4, 2010

I have an application that I need to load data in a background thread and make available to a combobox or list box on my main form or UI Thread. I am really new to threading in VB and how to best accomplish this. Here is some code from a test project:

[Code]...

View 7 Replies

VS 2008 Http Post Reply?

Mar 29, 2010

I have the following code, and i would like to know how i can show the result i got from the post.

vb Imports System.IO
Imports System.Net
Module Module1
Sub Main()
' Send("http://yahoo.com")

[Code]...

View 2 Replies

.net - WCF Service Hosted In A Managed Windows Service Connect Using A WCF Service Application

Jul 14, 2011

i have a Windows service that is hosting a WCF service through net.tcp and this is working great. I have also created a WCF service application. I am trying to add the net.tcp service reference to the service application. Then I add it to the GAC that goes ok but if I try to RegAsm the WCF service application to allow it to be called from Server.CreateObject I get the error:

Warning: Type library exporter encountered a type that derives from a
generic class and is not marked as
[ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be
exposed for such types. Consider marking the type with
[ClassInterface(ClassInterfaceType.None)] and exposing an explicit
interface as the default interface to COM using the
ComDefaultInterface attribute.

It does not work. I have tried to call it through a class library but this does not work either as the end point is not set correctly.

View 1 Replies

Access Uithread Components From The Background Thread?

Feb 24, 2009

I can't seem to find a good tutorial on how to access uithread components from the background thread.. It seems like there is different means of accomplishing this. I'm not picky about which one I use.

View 1 Replies

VS 2008 - How To Get Image From HTTP Server Via Raw Socket

Apr 7, 2010

I am using Async socket class to handle HTTP data. The OnRecieve event handler looks like this:
Private Sub sck_onDataArrival(ByVal sData() As Byte, ByVal BytesTotal As Integer) Handles sck.onDataArrival
Try
Dim ms As New IO.MemoryStream(sData)
Dim returnImage As Image = Image.FromStream(ms)
Picturebox1.Image = returnImage
Catch ex As Exception
Debug.Print(ex.ToString)
End Try
End Sub

I realize this will not work because the byte array still contains the header information from the response from the server. How to strip this data without converting the byte array to a string. I need to strip the header response information and just be left with the image data and from there convert that data into a stream so the stream can be loaded into an image and displayed in my picturebox.

View 8 Replies

VS 2008 - Replace Content= +enter+http

Feb 11, 2010

I have a program, and a string is generated. something like:

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:movie_imdb CONTENT= [URL]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:movie_urls[] CONTENT=[URL]

Now I need this to be:

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:movie_imdb CONTENT=[URL]
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:movie_urls[] CONTENT=[URL]
v=ACFXQPGT

I know this might look easy, but I already trid so much but it doesn't work.

Now I was trying a regex:

Dim pattern As String = "CONTENT=|?http"
For Each m As Match In Regex.Matches(Data, pattern)
MsgBox(m)
Next

But I don't know what the "|?" or pattern should be.

View 2 Replies

VS 2008 - Return Image From A Http Request

Apr 25, 2012

I have coded very simple asp pages to return an image when requested. But I need to do this from a vb.net application. So I assume I need to create a mini http web server. I have code for some that does not support asp or anything like that. Is there another method to return an image? Anyone have an example of this? Or again, do I need to find a web server control or app to use?

View 3 Replies

VS 2008 Download All Files In A Directory Using HTTP Or FTP?

Jan 20, 2010

How would I go about downloading all the files in a directory using HTTP and FTP?(Im asking for both method)I only know how to download a single file using FTP and HTTPBut I'm working on something and it needs to download lots of files in one directory.and if anyone could, can you also show me how to get the progress to go along with the downloading status?

like --->
Total Files : #
Speed : # in MB

[code].....

View 4 Replies

How To Access Local Web Service (IIS)

Nov 14, 2010

I have developed a web service on my LAN PC, then I hosted that Web Service using IIS and now I can access that web service on that Local PC using http://localhost:<PortNo>/Service.asmx and similarly I can access this service from another PC on my LAN network using http://<ip address>:<PortNo>/Service.asmx, all is well.

Now I am trying to access this web service from a VB.net Program on another PC on my LAN. I added the Service to my VB.net Project using the Add reference in solution Explorer, all is well again. Now the problem is I don't know how to access that service in my code? When I try something like this:
dim myService as new WebCalService
'Webcal is my service running on a network PC.
I get an underline under WebCalService and it says Type Expected? How to use a WebService on a LAN in VB.net??

View 1 Replies

How To Consume / Access A Web Service

May 9, 2010

I need to write a Windows forms app in VB 2008 to communicate with a Web Service.I have searched MSDN and many other sites trying to find a good tutorial or example code with no luck. The one really good piece of code I found did not compile.It needed to import Microsoft.UDDI.I found numerous references to the UDDI SDK, but could not find any site where I could successfully download it.I have the UDDI.dll but it is in my VB 8 folder and would not register.There is no such ddl in my VB 9 folder.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved