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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to merge existing code with web services.

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :ASP.Net

Hello, I am new to ASP.NET.  I am just now learning about all the benefits.  I currently have some C# code that receives sensor signals such as distances from a robot and I wish to put that code into web services and into a website, so that if I want to gather some information from the robot i can through the web, as well as send signals back.  I haven't found any information yet on how to do this. 

I am just looking on how to intergrate the existing C# code I have to a web service

Any help would be great and any example would be great. 

Thanks in advance!!

View Complete Post

More Related Resource Links

How to merge an existing Intranet Website Into Sharepoint Services 3.0

How to merge an existing Intranet Website Into Sharepoint Services 3.0?

Wicked Code: Running ASMX Web Services on STA Threads


Jeff Prosise describes performance problems in an ASMX Web service that relied on legacy COM and Visual Basic 6.0 to perform key processing tasks and the approach he took to find a fix.

Jeff Prosise

MSDN Magazine October 2006

Know Thy Code: Simplify Data Layer Unit Testing using Enterprise Services


If you want to employ unit testing and test-driven development techniques in your database application development process, you'll have different factors to consider than you do when you're not involving a database. For example, you have to maintain a consistent state within the database and be able to roll back transactions when necessary. This article shows you how to get the best of unit testing for your database apps in a safe, usable manner.

Roy Osherove

MSDN Magazine June 2005

ASP.NET: Combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals


If you want to schedule ASP.NET tasks, one solution is to use a Web service to provide an interface to your ASP.NET application and build a Windows service that calls to it at scheduled intervals. Thus the ASP.NET application doesn't have to own the scheduling logic. Here the author shows how to schedule your ASP.NET tasks using a Windows service to initiate the Web service call because Windows services can start themselves when Windows boots up.

Andrew Needleman

MSDN Magazine March 2005

Resume SharePoint Services Web Application and returns code 1387 error


Hello everyone! Newbie here. I would like to ask how to start the SharePoint Services Web Application on (WSS3.0,internal database, stanalone users) without getting error 1387 ?

I would love to provide more information regarding this issue but what I got is error 1387 displayed in the browser.

I look forward to seeing you guys feedback from your expertise angle.



Custom SharePoint Timer Job doesn't run after changing code and restart timer services.

Hi We are facing an issue that our custom SharePonit Timer Job doesn't run after a changing the code. First, we developed and deployed a timer job. It worked fine for a few days, then we detected a memory leak and killed the OWSTIMER.EXE. (Maybe we should uninstall the timer job and restart the timer services nicely). We fixed the problem, redeployed the fix as a feature (assemblies are re-GACed ...) to our small SharePoint farm (one web server, one services server), restarted the SharePonit Timer Services. Now we can see the time job in Timer Job Definition in Central Admin but the job never runs (Since it doesn't run, the timer job status page doesn't have any info about it). We tried the same process in a dev environment with SharePoint signle box installation. The timer job just works fine. I did some search on Internet and followed some instruction to clear the cache from "C:\ProgramData\Microsoft\SharePoint\Config\1d50d73c-9bf1-4444-85a9-910ed050d1bf" by 1. Remove all the xml2. Clear the cache.ini with "1".3. restart the timer services. It still doesn't fix the problem.Please advise what else I can do. I even rename the timer job and redeploy it. It doesn't help. I checked the even log and SharePoing log and couldn't see anything wrong. Our OS is W2K8.         public override void FeatureActivated(SPFeatureReceiverProperties properties)        { 

Need help to merge all the code into only one query

Hi guys,   Can anyone help me, please to merge all the queries below into one query? Thanks in advance, Aldo.   DECLARE @i smalldatetime, @FirstDate smalldatetime, @LastDate smalldatetime, @SortGroupStart INT, @SortGroupEnd INT, @TargetSales REAL; SET @FirstDate = '2008-10-01T00:00:00' SET @LastDate = '2008-10-31T00:00:00' SET @SortGroupStart = 3000; SET @SortGroupEnd = 3999; SET @TargetSales = 300000;   if object_id('MonthlySalesIncrement_20081002000_Calendar') is not null exec(' DROP TABLE MonthlySalesIncrement_20081002000_Calendar'); CREATE TABLE MonthlySalesIncrement_20081002000_Calendar (CalendarDate smalldatetime PRIMARY KEY) WHILE @FirstDate <= @LastDate BEGIN INSERT INTO MonthlySalesIncrement_20081002000_Calendar (CalendarDate) VALUES (convert(smalldatetime, @FirstDate, 121)) SET @FirstDate = DateAdd(dd, 1, @FirstDate); END   if object_id('MonthlySalesIncrement_20081002000') is not null exec(' DROP TABLE MonthlySalesIncrement_20081002000'); SELECT convert(smalldatetime, Stock.VALUEDATE, 120) AS 'Stock.VALUEDATE', StockMoves.DOCUMENTID AS 'StockMoves.DOCUMENTID', StockMoves.SUPPLYQUANTITY AS 'StockMoves.SUPPLYQUANTITY', StockMoves.PRICE AS 'StockMoves.PRICE', StockMoves.RATE AS 'StockMoves.RATE', StockMoves.DISCOUNTPRC AS 'StockMoves.DISCOUNTPRC', Stock.DISCOUNTPRC AS 'Stock.DISCOUNTPRC', RATES.RATE AS 'RATES.RATE' INTO MonthlySalesIn

Calling WCF Services From Silverlight Keeping The Code Inline in VB.NET

Hello,   I have a large amount of code that I'm trying to convert to a Silverlight 4 Application from a VB.NET Win Forms App.  All of the business logic code is written inline calling stored procedures on a database.  There is so much code that it's overhelming to be making asynchronous call after asynchronous call back to the WCF service.  The code is now all over the place since I'm having to chain methods all around after the WCF calls complete.    I don't really need these WCF calls to be done synchronously (since we don't want to block the main UI thread), but is there any good way in VB.NET to keep all the code in-line when calling a WCF service?  Is there some sort of wrapper that can be used to call the WCF methods or another way?  I know some of this is done easier in C#, but I'm having some issues with this being done in VB.NET.   Example In The VB.NET App I'm Converting:   Dim Customer As New Customer   If Customer.CheckIfCustomerExists(10) = True    'Calls the database, checks if Customer #10 exists        'Do Something   Else       Dim CustomerNum As Integer = Customer.InsertNewCustomer("Customer Name")       'Do Something    End If In Silverlight This Woul

Moving part of the code/processing from Asp.net hosted in IIS to WCF-Windows Services will help to r

I have a web application with no user interface (GUI), this web application (asp.net) accepts some input from a program and doing some processing; In the Page Load event I am doing all processing and calling a WCF service, after receiving the response from WCF services the page get unload before writing the processing status/result to database) this asp.net application is hosted in IIS.   The WCF services is also hosted in the same machine in windows Services where IIS is hosted, I am concern about its performance of the application which is hosted in IIS.  Should I move some part of the code (processing) to another program say Create a new WCF Services and host it in Windows Services  so that the load on IIS will be reduce?  The new WCF Services will process some part of the code which IIS used to process, so helping IIS to reduce the load.       By moving some part of code from asp.net [processing] to another program hosted in WCF- Windows Services in same machine will able to reduce the load on IIS?   Please guide me.. Thanks Shaju

multiple services to same code destination

I've been using WCF for years and have been in the 90 of the 90-10 rule.  Now I need to start using WCF in ways that don't fit neatly.  I find it exciting, actually.  But it's a lot harder to find the information I need.  So I'm turning to this forum.  I have two fundamental questions: 1. In the config file under the "service" tag, is the "name" attribute like the "codebehind" value in an asp.net page?  i.e., does this always map to the code that is called? 2. Is it possible to specify two difference services with two different endpoints go to the same code location?  If so, how would that code be able to determine which service was called?  I know I could implement two different code destinations that call on the same reused code elsewhere but I may not have that option given the state of our legacy code.

Installing Integration services as standalone on a existing cluster


Hi All,

  I have SQL Server 2005 std edition installed on a windows 2003 clustered server. As integration services does not support i was asked to install it as a standalone on both nodes. When I had started the setup it showing on both the nodes. How do i install it only one node at a time and not on the cluster. Do i need to have separate instance of sql server too.



Chandra Mohan



Where to find code samples for Microsoft® SQL Server® 2008 Analysis Services Step by Step



I got this book  Microsoft® SQL Server® 2008 Analysis Services Step by Step by Scott Cameron, Hitachi Consulting from our tech Library , however the companion CD is missing. Can anybody share the CD / practice code examples with me please? The book is only useful if I get to practice the code alongside reading the theory!



Using custom code on report services to check if directory does exist or not (need help)


I am trying to check if a directory does exist.  I have used the vb.net to create a very small function and embedded into the "Custom code:" section of Report Properties.  It’s output is a return of Y or N (string) or 1 or 0 (Integer) if directory exist or not. 

Here is the code which returns a String

    Function ifDirExist(ByVal mypath As String) As String

        Dim flag As String

        If Not System.IO.Directory.Exists(mypath) Then

            flag = "N"

Adding XML doc template to existing code

Hi Everyone,
    I would like to know if there is any tool that can add XML documentation templates to a source code.  Basically, I want to add XML documents to new source code. The existing source does not have XML documentation for existing classes, so when I add XML documentation to new class, I get compilation error indicating no XML documentation for old classes.  Is there a tool that is available that can parse the source code and then add XML doc templates ?

For example,
If I have the following code:

class TypeByName




Getting "A domain group is missing for one or more services" error when adding new node to existing


Hey all,

Current configuration:

2-node sql 2005 cluster

windows 2003 enterprise R2 w/ sp2 x64

sql 2005 enterprise x64 SP3


In the process of adding a third node into the existing 2-node cluster, we received the

"A domain group is missing for one or more services.  To install SQL 2005 as a failover cluster, domain groups must be specified for all the clustered services bing installed. To proceed, enter the missiong domain group information." 

The existing cluster functions properly and has been running w/o problems for a long while now.  An AD Global Group was created to support the cluster back when the cluster was initially created.


I found different suggestions from people online about this issue, any where from adding registry keys to take trailing blank space from sql resource group name, but none works. 


Any ideas?


Thank you in advance for any assistance.



How do I Host Existing WCF Services in IIS 7?


I have some .svc files, a .dll, and a web.config file. I know that they work because I can add them to a new ASP.net web application and the services start. My problem is that I can't figure out how to start them from IIS. I have followed many tutorials but none of them work. Considering I have all of the files could someone give me the steps to start the services in IIS 7 please?

I have already ensured that IIS is installed, ASP.net stuff is installed, and ran ServiceModelReg.exe


Infopath Form Services 2007 pass URL from one XSN to another without code


Is it possible to pass the current URL value in an opened Infopath Form to another Infopath form withouth using code? Basically I am trying to pass variables from one XSN to another & the requirements are such that I cannot combine the forms & I am unable to use C#.

Just wish I could get a handle on the Site Referrer value out of the box in Infopath without code. Javascript might be ok if I can embed it in the XSN file and then somehow call it from the XSN file on submit. Is that even possible? Or can this be done without code at all?

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