VS 2012 - How To Get Started On Existing Web Service Code Copied Locally

Apr 7, 2014

We have a web service running live. Last week, we pulled the source code down to my machine and successfully built it.

My goal is to become familiar with this code and document it. My problem is that I am not sure how to get it running locally.

First of all, I have to configure it in IIS or something? How do I do that, and is that indeed the right place to begin? I tried creating a consumer in a separate VS solution, and when I said browse for local web services it said "Active Directory Services cannot find the web server."

I tried this link, but got lost when it said "3.Under Visual Studio installed templates, click ASP.NET Web Service." because I don't have that template.

View 4 Replies


Similar Messages:

WCF / ASMX :: Generate Web Service In Web Application Using Existing Code?

Jan 15, 2011

Currently I have project in ASP.NET 2.0 and I wanted to implement web services using my existing code.

View 2 Replies

VS 2010 - Web Service Runs Locally But When Deployed Has Error Could Not Create Type Service

May 24, 2012

I developed a web service in VS2010 on my local machine, wrote a consumer of it also locally, and that all works.

I copied the dll and the asmx file to our server, and I am getting an error when I try to invoke it from a browser (also still on the server machine) to make sure it correctly exposes its web methods, but it is not, it is saying "Could not create type 'Service'". That error comes from this line:

Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WarrantyDuplicate.cs" Class="Service" %>
There other web services in the same folder on the server that all work fine so I don't believe it's an IIS setup thing.

This is my first web service in C# and when I created it in VS I did think it odd that the code behind file went into App_Code (as you can see from the line in the asmx file) and is just named dot-cs rather than asmx-dot-cs. But since it worked fine locally, I wasn't sure that mattered.

View 2 Replies

MVC :: Code Behind Can't Recognize Server Controls After Copied To Project From Old Webform

May 30, 2010

I migrating a large asp.net webform site to MVC. I want to mix match old asp.net web form and asp.net mvc together for sometime and gradually convert the webform model to pure mvc model.

So i copied all aspx/ascx files from the old webform site to my mvc project. Now when i compile, i get build error. Code behind files can not find any server controls inside their aspx pages.

I can solve this problem by adding a desinger.cs file for each of the aspx,ascx file but that simply is not viable for me since i am dealing with hundreds of aspx pages and user controls and i can not afford to manually add a designer file for each of them.

View 7 Replies

WCF / ASMX :: How To Host A Web Service Locally In Iis

Jul 12, 2010

This my scenerio

1. I have created a web service

2. I need to host it in IIS locally for testing purpose.

3. Can we set port locally or automatically port '80' is assigned.

View 1 Replies

Configuration :: Web Service Works Locally But Not When Deployed?

May 28, 2010

When I deploy my web service, I get the following error:

There is no build provider registered for the extension '.svc'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

I found one thread ([URL] that a solution but, I can not get it to work. If I make the changes to my web config file as in the thread, I then get a configuration error. One odd thing is that, if I check the machine.config file on my machine, located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIGmachine.config, I don't see any of the config settings described in the thread. As a matter of fact, there is no mention of "compilation" or "buildProviders" at all.

Here is my entire config file listing:

[Code]....

View 2 Replies

Architecture :: Using .asmx (web Service) Files Locally Within Web App As The Datasource?

Jan 5, 2011

I have been wrestling with web services technology/techniques for part of 2010 - learning how to reate/consume/deploy... I have also been experimenting with third party web controls from ComponentArt. In some of the samples from ComponentArt I observed that they use .asmx files locally to populate their custom data controls (datagrids, comboboxes, treeview controls...). What is interesting (and a little bit confusing to me) is that in the ComponentArt samples they reference the web services directly within their controls in the markup. My question is if this can be done normally with controls that ship with Visual Studio (any version -- I have em all 2005, 2008, 2010). I ask this question because from VS I only know to reference web services by right clicking on the project in the solution explorer to add a web reference.

Here is the services tag used by ComponentArt

<Services>
<asp:ServiceReference path="FileExplorerTreeViewService.asmx" />
</Services>

Then in the property grid of a data control -- say a treeview control-- they reference the web service, and when the project is run -- the control is populated with data from the web service.

Do data controls from VS support this technique? My other question is if there is a benefit to using a web service as a datasource for a control and what is this benefit? What is the criteria for using a web service in this manner?

View 3 Replies

WCF / ASMX :: How To Convert Existing Web Service To Framework 3.5 Service

Sep 20, 2010

I have running existing web service in framework 2.0, but i want to convert all my service to framework 3.5 WCF Service..

View 1 Replies

Web Forms :: Started Process Not Executing Any Code When Run Through IIS?

Aug 23, 2010

I am calling a simple console application (exe) using process.start. Within this application, I am writing events to the event log.

View 6 Replies

VS 2012 - Get Data In Code-behind From ListView

Jul 16, 2015

how I can get item values in a ListView in code-behind? I’ve searched high and low during the past 2 days and tried various possibilities to no avail. Data binding is being done in code-behind:

Code:
SQLString = "SELECT Field1, Field2, Field3 FROM Table1"
DataTable1 = LoadDataTable(Connection1, "SELECT Field1, Field2, Field3 FROM Table1")
ListView1.DataSource = DataTable1
ListView1.DataBind()
ASP:

[code]....

The aim is that once a user clicks on a particular row in the ListView a pop-up is displayed which in turn reflects all data related to the record. For the purpose of preparing the data for the pop-up I need to determine the unique record identifier.

I have the same code working perfectly in another app, which has to effect that once a user clicks on a particular row in the ListView a new tab is opened which in turn reflects all data related to the record.

View 1 Replies

VS 2012 - Code In Source Keeps Jumbling All Up

Aug 14, 2013

I am creating a web app using vs 2012. I am constantly having re-arrange my code because, each time I either scroll or move off the page, I go back and it's all jumbled up again. E.g.

<table><tr><td></td></tr></table> 'fixed nicely

scroll or move off the page:

<table> <tr>
<td>
</td></tr>
</table>

Is this just the way it is...or is there a way to fix it so it stays as how I put it?

View 3 Replies

VS 2012 - How To Tell Difference Between Source And Published Code

Feb 5, 2014

How can I tell the difference between source and published .NET code?

I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?

Is the .csproj file or the .sln file part of the code pushed to the server when you publish? What other differences are there that I are immediate and obvious?

View 1 Replies

Have Copied The Code From The "download Chapters" And It Still Doesn't Work?

Jan 16, 2010

I have the book ASP.NET 3.5 WEB SITE. I can't get the view/edit employee to work. (Chapter 10) I have copied the code from the "download chapters" and it still doesn't work. Am I missing something? I don't see where there were typos on this chapter

View 13 Replies

Configuration :: Upload Via FTP Works When Code Runs Locally But Not From A Remote Server?

Nov 15, 2010

I have a page which uploads a file from server A to server B. The user first uploads the file to server A, where it's saved into a diretory, then once the file is safely stored there, I'm transferring it to a second server, server B, using the following code:

[code]....

So, in summary, the only difference I can see between the working case and the non-working case is the server that'ssending the file.

View 4 Replies

Can Use An Existing Type To Be Passed Through WCF Service

Jul 20, 2010

I have a service. I have an existing class of business objects. What I would like to know is how can I pass a class through WCF from the business object assembly without having to create a new class in my WCF site while appending or tags?

Here is an existing UDT:

[code]....

View 2 Replies

How To Use HttpContext Of An Existing Web Site From A Web Service

Sep 27, 2010

I am building a web service which uses some of an existing web site's methods. However, some classes and methods cannot be used (for example Redirect - which obivously throws an exception when not invoked from a web site's context).

Now I came to a section in code where

HttpContext.Current.Application.Get(keyNames.EncodedKey) Is used. (Where keyNames is a struct, and EncodedKey is a string.)but HttpContext.Current is null..

What is a valid substitution for HttpContext.Current.Application.Get?

I should mention that I've only checked this from a unit test, not the web service itself and following Darin's answer I realize that is the problem, so the question now is- how to mock HttpContext.Current(using moq)?

View 1 Replies

WCF / ASMX :: Add Tables To A Existing Web Service?

Feb 1, 2011

Someone knows a tutorial for a sql database web service in VB. I need to add tables to a existing web service

View 2 Replies

WCF / ASMX :: Add A Web Method Existing Web Service And Consume It?

Jun 30, 2010

I added a Web Method to the existing web service. I don't see this method in my web project. I can see all the old methods but I couldn't access this method. Do I have to create proxy for this method?

View 2 Replies

WCF / ASMX :: Need Details On Returning An Entire Existing XML File From A Web Service?

Jan 20, 2011

I've been reading quite a few tutorials on web services and xml files and one thing isn't quite clear to me. If I want to create an XML file on the fly the tutorials are pretty straight forward but, I want to grab an existing XML file from the web server and return the whole thing. Do I need to read the XML file and send each individual node or is there a way to send the file all at once? The tutorials imply that the whole file could be a node but I'm not clear on what that entails or if it would work. Also do you have a link to an example?

View 1 Replies

WCF / ASMX :: Adding A New Contract To Existing Service Error - The Underlying Connection Was Closed

Feb 26, 2011

I have a WCF service which has 4 Operation contracts.

I have added a new contract and it gets the data from database and returns the result set.

I can access the new contract and the service get the correct result set. But while passing the result set to the client I get the error of The underlying connection was closed: The connection was closed unexpectedly.

What are the steps to follow after adding a new contract like new binding etc.

View 3 Replies

How To Replace As Little As Possible Of The Existing Code

Apr 15, 2010

I am receiving the contents of a file via ftp. I don't want to go into every detail (unless needed), but I am working with existing code that was using 3rd-party software to get ftp files. I am replacing that with .NET code. But I want to replace as little as possible of the existing code that is not specifically using the 3rd-party s/w. So I am trying to use a class originally written by the author of the code (a former employee).

This is his class constructor:

Code:

Public Sub New(ByVal fileName As String, ByVal content As StreamReader)
Me.FileName = fileName
Me.Content = content
Me.TimeStamp = Date.Now
End Sub

So I need to pass a StreamReader. My problem is how to get one.
In my procedure ReceiveFile(), I execute this code:

Code:

Private Shared Sub ReceiveFile(ByVal sFilename As String, ByRef objMemoryStream As System.IO.MemoryStream)
Try

Dim request As FtpWebRequest = DirectCast(WebRequest.Create("ftp site and folder" & sFilename), FtpWebRequest)
request.Method = WebRequestMethods.Ftp.DownloadFile
request.Credentials = New NetworkCredential("id", "pw")
Dim response As FtpWebResponse = DirectCast(request.GetResponse(), FtpWebResponse)
Dim responseStream As Stream = response.GetResponseStream()
Dim reader As New StreamReader(responseStream)
Dim sFile As String = reader.ReadToEnd
'reader.Close()
' response.Close()
'objMemoryStream = responseStream
Dim objStream As System.IO.MemoryStream
objStream = New System.IO.MemoryStream(Convert.FromBase64String(sFile))
' objMemoryStream = Convert.FromBase64String(sFile)
objMemoryStream = objStream
'Return reader
Catch ex As Exception
Dim i As Integer
i = 10
End Try
End Sub

responseStream is declared as a stream but when I query it in the debugger it says it's an FtpDataStream, after it's set equal to response.GetResponseStream. I want to take that stream and somehow get it into a MemoryStream. I thought I found the solution this morning via Convert.FromBase64String, but when I ran I got an exception saying "Invalid character in a base-64 string", and I think it's because of the newline character in the string. The file that's received contains three lines separated by a newline character.

View 22 Replies

C# - Calling A Web Service - Code For Consuming A Service Is Not Working ?

Mar 16, 2011

I have the following code for consuming a service that is not working for me. what I can do to narrow down whats going wrong?

The address is: http://localhost:57667/ExampleService.svc/

When visiting directly I get the 'You have created a service... message'

The code that goes wrong is here. It causes the following error:

_url = "http://localhost:57667/ExampleService.svc";
TextReader textReader = new StringReader(HttpPostClient.Post(new Uri(_url), bodyData.ToString(), _exampleServiceRequestEncoding, Properties.Settings.Default.HttpPostClientExampleAvailabilityTimeout));

ERROR MESSAGE:When visiting this URL directly: http://localhost:57667/ExampleService.svc/ProcessRequest

The exception message is 'No component for key example.ExternalWebServiceStubs.Example.ExampleService was found'.
Castle.MicroKernel.DefaultKernel.get_Item(String key) at Castle.Facilities.WcfIntegration.WindsorInstanceProvider.GetInstance

View 2 Replies

WCF / ASMX :: How To Merge Existing Code With Web Services

Sep 26, 2010

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

View 1 Replies

Logging Exception Without Changing Existing Code?

May 26, 2010

I have a application, and I want to log exceptions to a file and I don't want to change any code. I just want a component to which I can add my code and it will start logging exceptions. How can I do this?

View 3 Replies

Web Forms :: Removing Existing JavaScript And Replace With Code?

Apr 12, 2010

In ASP.NET 4.0 RC2 the Menu Control by default emits Javascript like this:

[Code]....

There should be a feature coming up to disable this, but I think it's not in RC yet. At least it's not working for me.

Now, the problem is, that this Javascript kills my own Menu Javascript (I use an CSS Adapter). Is there a way to overwrite the stuff that comes from the Menu control? Can be a hack, just need something until this is fixed by MS.

View 2 Replies







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