MVC :: Creating Wcf Service To An Application?

Sep 13, 2010

I wounder if there are some differencences when creating a wcf serivce to a MVC webbapplication.

how to create such a serivce for a MVC application. and returns a json object.

View 3 Replies


Similar Messages:

Creating A Web Service Application In .NET 4.0?

Mar 24, 2011

I am trying to create a web service application that will need to use .net 4.0 for my datamodeling and other things. I noticed in VS2010 when I select New | Project the "ASP web service app" option is available if .net 3.5 is selected in the combo box but if I change that to .net 4.0 the option goes away.

After researching the only thing I found was a message where someone suggested to use the WCF web service option. I have never dealt with WCF before so I have no idea what path that will lead me down.

Here is my concern... we have existing web services developed in .net 3.5 that are already in use and we have windows based client applications that are developed in Delphi (version 7.0 to be specific) that already talk to these web services with no problems and no special coding required. Delphi can simply import the WSDL which generates an interface unit that gets compiled in and away we go. This new service app I need to create must also be accessed via the same Delphi apps.

The current asp web service apps generate 4 files when "published": web.config, .asmx file and in a in folder there is a .pdb and .dll file.

Can anyone tell me if support for this type of web service app is still available via .net 4.0 and if so how do I create the project or is that something that has been discontinued and thus no longer possible?

View 2 Replies

Configuration :: Creating Web Service And Web Application In A Single Solution And Deploy?

Mar 30, 2011

is it possible to create web service and asp.net application in a single solution and deploy

View 1 Replies

Drawback To Creating A Separate IIS Application Pool For Each Website / Application?

Jan 5, 2010

Currently, on our production IIS web farm, we host about 15 applications in a single App Pool (Default App Pool). There are two websites and about 13 virtual directories.A colleague has recommended that we change our IIS configuration so each application is a separate App Pool (with identical settings).

Is there any drawback or potential issues to doing this?Is it possible that ASP.NET applications could have been built with the requirements that they are all within the same App Pool?

View 2 Replies

WCF / ASMX :: Add Service As Service Reference To VB6 Winforms Application

Feb 7, 2011

How do I add the WCF service built using VS2010 as a service reference to a Winforms app which is written in VB6?

View 1 Replies

Creating Web Service Failure?

Feb 17, 2010

In Visual Studio 2005.I have created a Blank solutions(XYZ) and then add a ASP.Net Web Service Project(TESTP) under it.And then create a .asmx file(WEBFI.asmx) and then write a method and add [WEB Method] on top of the method.Now compile it.And then publish it.But in publishing folder I didn’t found any WSDL file which I should call in different machine (which is in LAN ).

View 6 Replies

C# - Creating WCF Service To MVC Webapplication

Sep 13, 2010

I wonder if there are some differences between creating a WCF service and an MVC web-application. If you know of good links on how to create such a service for an MVC application that returns a JSON object please do post them.

View 1 Replies

C# - Creating And Exposing Web Service In MVC 2

Feb 20, 2011

I've looked around for some tutorials, but everything I see is how to use REST services with my app. But that's not really what I need, I'm not doing basic GET requests, the end user needs to do some complicated calculations with several classes and variables from my web service.

In a Web Forms app, I would just add a Web Services solution and do everything in there. Is that the recommended solution for an MVC app?

View 2 Replies

Configuration :: Creating An Msi For A Web Service?

Nov 11, 2010

I am trying to create an msi for a Web Service. I want the web service to be installed as a 'Web Site' not as an 'Application' under Default Web Site in IIS. I have code that creates a web site, but when I try to add it as a custom action under the install node of the msi, the code isn't getting executed. Reading about installers, it seems that anything under the install node gets fired after the installer has already started, if that makes sense. I want to be able to create the web site before the installer actually begins the installation process so that when the user comes to the window where he/she has to choose the Site under which to install the web service it can already be listed there and they'll be able to choose it.

View 1 Replies

VS 2010 Errors With Creating Web Service

Mar 5, 2011

I am new to the whole ajax/jquery/web service scene. I am trying to create a web service to pass back data for a jquery post and currently have two errors. It appears there are examples the web but must in c and looking for something in vb. Below is my web service. See in bold the error descriptions and in red the items visual studio is highlighting.

WordsService.asmx
HTML Code:
<%@ WebService Language="VB" CodeBehind="~/App_Code/WordsService.vb" Class="WordsService" %>
WordsService.vb
Code:
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Runtime.Remoting.Services
Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports System.Data
Imports System.Web.Script.Serialization
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="[URL]
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WordsService
Inherits System.Web.Services.WebService
Private _sConn As String = ConfigurationManager.ConnectionStrings("DB").ConnectionString

'1) Type 'ScriptMethod' is not defined.

'2) Value of type '1-dimensional array of String' cannot be converted to '1-dimensional array of 1-dimensional array of String' because 'String' is not derived from '1-dimensional array of String'.

<WebMethod(Description:="Gets the books matching part of a title."),
ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
Public Function GetBooksByTitle(ByVal strTitle As String) As String
Dim myConnection As SqlConnection = New SqlConnection(_sConn)
Dim objCommand As SqlCommand = New SqlCommand("SELECT * FROM table WHERE field like '%" _
+ (strTitle + "&' ORDER BY field;"))
Dim dsSearch As DataSet = New DataSet
Dim sdaSearch As SqlDataAdapter = New SqlDataAdapter(objCommand)
sdaSearch.Fill(dsSearch, "english")
myConnection.Close()
' Create a multidimensional jagged array
Dim JaggedArray()() As String = New String((dsSearch.Tables(0).Rows.Count) - 1) {}
Dim i As Integer = 0
For Each rs As DataRow In dsSearch.Tables(0).Rows
JaggedArray(i) = New String() {rs("BookNum").ToString, rs("Title").ToString, rs("Author").ToString}
i = (i + 1)
Next
' Return JSON data
Dim js As JavaScriptSerializer = New JavaScriptSerializer
Dim strJSON As String = js.Serialize(JaggedArray)
Return strJSON
End Function
End Class

Here is the article I am currently following for example: How To Create A JSON Web Service In ASP.NET.

View 3 Replies

C# - Creating Web Service Singleton Object

Dec 1, 2010

I am creating a singleton object in the first request to the web service and keeping it in the memory. This works fine for first few seconds. If I make a request 5 minutes later, I can see that the singleton object is created again? is my singleton object getting disposed after x no of minutes? how can i make increase the life-time of my object forever ?

public sealed class Singleton
{
static ServerInstance instance = null;
static readonly object padlock = new object();
Singleton() {
}
public static ServerInstance Instance {
get {
lock (padlock) {
if (instance == null) {
instance = new ServerInstance();
}
return instance;
}
}
}
~Singleton()
{
#if DEBUG
ExceptionFactory.Fatal("~Singleton() called!");
#endif
}
}
[WebMethod]
public string OnReceiveEvent(string objectXmlData, string objectType) {
if (!Singleton.Instance.initServerComplete) {
InitServer();
}
return Singleton.Instance.OnReceiveEvent(objectXmlData, objectType);
}
public void InitServer() {
if (!Singleton.Instance.initServerComplete) {
Singleton.Instance.InitServer();
Singleton.Instance.initServerComplete = true;
GC.KeepAlive(Singleton.Instance);
}
}

View 2 Replies

Creating / Consuming Web Service For HTML?

Mar 2, 2011

i have a requirement to build some sort of services that can easily be called to a 3dr party API.

the call can be done through simple
1) HTML page
2) ASPX page
3) MOBILE device

should i create a separate web service project separately and create few methods [WebMethod] ?

also the method can be static?

/// <summary>
/// Summary description for signup_service
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]

[Code]....

View 1 Replies

WCF / ASMX :: Creating A Sample Web Service Response?

Sep 8, 2010

I am trying to simulate a sample web service payload similar to that which i will receive one the webservice is live. Can anyone help me simulate this?Criteria for my response will be:a bool pass or fail string - message and the object (in this case in the form of a list) heres the class I am to populate with sample data:

[Code]....

How can I use this class to put sample data in it? Lets say I want to put customers in the list 'ReturnObjects'?

View 6 Replies

C# - Creating A Background Thread In A WCF Service During A Call?

May 21, 2010

The following code is part of a WCF service. Will eventWatcher take up a thread in the ASP .NET thread pool, even if it is set IsBackground = true?

[code].....

View 1 Replies

WCF / ASMX :: Creating Automatic Service Call Url

Jul 23, 2010

I am creating new WCF service and i would like to do two way XML for communicating with third party vendors. My wcf service get the request from the outside program by means of URL and it should response accordingly.

Example - I have url which third party will call and put xml as a request, i have to get that xml, work accordingly and response back with either success or failure and appropriate xml. I need to make it completely automatic so anybody can call that url, it will validate that user and do the next step of request and response.

View 1 Replies

WCF / ASMX :: Creating Restful Service - Concurrency

Jan 15, 2011

i am in the process of creating a restful service with WCF, the service is likely to be consumed by at least 500 people at any given time. What settings would i need to set in order to deal with this.

Here is a sample of what i have so far;

[Code]....

And this is an example of a method being called;

[Code]....

View 1 Replies

WCF / ASMX :: Creating Class Library From Web Service?

Dec 17, 2010

We are consuming third Web services.

Instead of using datatypes from web service proxy we need to create our own class which will take the values from web service output.

Since the web service data types are so much deep,we are facing lots of problems to create our cutom classes.

Is there any tool available to create classes directly from web services in ordered way....

View 2 Replies

AJAX :: Creating Notification Service For Users?

Mar 18, 2010

I'm facing a senario in which I want my logged in users can send requests to each other(Request generally is official request like request for resources, etc.).

And other user can get notification for new request(But this is not about e-mail notification).I want to use ajax. I have no idea how to start with. Please somebody help me with this. Simple example will be great to start with.

View 3 Replies

WCF / ASMX :: Creating A Web Service Properly & Effectively?

Dec 16, 2010

i had my code in .aspx page which i trnasfeered to the .asmx pageso i get error in few places in .asmx pageUnable to cast object of type 'System.String' to type 'System.String[]'earlier i had a label control which i hve replaced with a variable in .asmx pagelet me knw hoe to do the few modification to make it workingi hve the below code which gives me conversion frm string to string[] errorPrivate Shared errorList As List(Of String) = New List(Of String)dim msg as string

If errorList.Count = 0 Then
msg="Sucessfully done"
Else

[code]...

View 2 Replies

Active Directory/LDAP :: Service Reposding Slow In One Application And Fast In Another Application

Jun 16, 2010

I have two applications(A,B) both are developed in .NET3.5 and used LDAP services.Application-A in one screen we are fetching users with role "project Leads" and it is taking 10 min time

Application-B in login screen we are checking user is authenticated or not and it is taking 20 sec

Both the applications are using the same service then way there is a time span problem. Please suggest me what can I do to improve performance of application A?

View 3 Replies

State Management :: The Service Seems Not Working Correctly - Application Pools Recycles The Application Loose The Session?

Jul 7, 2010

we are experiencing big difficulties in the configuration of ASP.Net state service and II7. The service seems not working correctly because when the application pools recycles the applicatio loose the session.If we try the same configuration in IIS6 it works correcly.What is the correct way to configure the aspnet session state service in iis7?

View 2 Replies

Visual Studio Can Install Template For Creating Web Service

Apr 20, 2010

In Visual Studio 2010, I don't see the Visual Studio installed template to create an ASP .Net Web Service Website (when I click on File->New->Web Site..) if the target framework is 4.0. However if I switch to FW 3.5 or lower, I do see the template.

View 1 Replies

WCF / ASMX :: Creating Web Service Cross Domain Security?

Feb 22, 2011

I wont to restrict my web service only for few domains.

I wont to have access to web service from using ajax and my page, and I don't want that anybody can create client to my WebService and view my web service methods.

View 4 Replies

MVC :: Creating Data Service In Project With Vs2010 - Getting Error

Mar 23, 2010

I get the following error which I don't get when I build a simple WCF Data Service in an non MVC project. I added the following to my global.asax:

[Code]....

The type 'MvcWebApp.WcfDataServiceTwitter', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

View 2 Replies

WCF / ASMX :: Creating .Net Web Service To Send Multiple XML Files

Apr 27, 2010

I have to define a web method which will fetch XML documents from another web service based on the list of projects from the database. Now I need to send these XML documents in different SOAP envelopes. XML documents can be more than one.

View 1 Replies







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