Search Results

Search found 26126 results on 1046 pages for 'generic service contract'.

Page 67/1046 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Deploying service from development server to iis7 server

    - by MindWorX
    I have a service which works perfectly on the local development server, but once moved to the remote iis7 server, it fails. I've been browsing the service in a browser manually. Here's the steps I've been taking: Open up Service.svc Open up Service.svc?wsdl Open up Service.svc?wsdl0 Open up Service.svc?xsd=xsd0 Step 4. is where it fails. If i browse on the development server it works. If i browse on the iis7 server, I get a connection reset error. Any help appreciated.

    Read the article

  • A generic error occurred in GDI+.

    - by Pinu
    A generic error occurred in GDI+ [ExternalException (0x80004005): A generic error occurred in GDI+.] System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) +615257 I have a webpage in which a pdf is converted to png, and using the response.outputstream it is displayed. when i run this on my local machine is works fine. but when i run the same code on server is throws this exception. my question is , where i could look in for error. as there is no inner exception or any other information provided. only clue is that it's happening on Image.Save , but the same code works perfectly fine on my local machine , then y is it not working on production???

    Read the article

  • jQuery AJAX Web service works only locally

    - by Greg
    Hi, I have a simple ASP.NET Web Service [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService] public class Service : System.Web.Services.WebService { public Service () { } [WebMethod] public string SetName(string name) { return "hello my dear friend " + name; } } For this Web Service I created Virtual Directory, so I can receive the access by taping http://localhost:89/Service.asmx. I try to call it via simple html page with jQuery. For this purpose I use function CallWS() { $.ajax({ type: "POST", data: "{'name':'Pumba'}", dataType: "json", url: "http://localhost:89/Service.asmx/SetName", contentType: "application/json; charset=utf-8", success: function (msg) { $('#DIVid').html(msg.d); }, error: function (e) { $('#DIVid').html("Error"); } }); The most interesting fact: If I create the html page in the project with my WebService and change url to Service.asmx/SetName everything works excellent. But if I try to call this webservice remotely - success function works but msg is null. After that I tried to call this service even via SOAP. It is the the same - locally it works excellent, but remotely - not at all. var ServiceUrl = 'http://localhost:89/Service.asmx?op=SetName'; function beginSetName(Name) { var soapMessage = '<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SetName xmlns="http://tempuri.org/"> <name>' + Name + '</name> </SetName> </soap:Body> </soap:Envelope>'; $.ajax({ url: ServiceUrl, type: "POST", dataType: "xml", data: soapMessage, complete: endSetName, contentType: "text/xml; charset=\"utf-8\"" }); return false; } function endSetName(xmlHttpRequest, status) { $(xmlHttpRequest.responseXML) .find('SetNameResult') .each(function () { var name = $(this).text(); alert(name); }); } In this case status has value "parseerror". Could you please help me to resolve this problem? What should I do to call another WebService remotely by url via jQuery. Thank you in advance, Greg

    Read the article

  • Edit the opposite side of a many to many relationship with django generic form

    - by Ed
    I have two models: class Actor(models.Model): name = models.CharField(max_length=30, unique = True) event = models.ManyToManyField(Event, blank=True, null=True) class Event(models.Model): name = models.CharField(max_length=30, unique = True) long_description = models.TextField(blank=True, null=True) In a previous question: http://stackoverflow.com/questions/2503243/django-form-linking-2-models-by-many-to-many-field, I created an EventForm with a save function: class EventForm(forms.ModelForm): class Meta: model = Event def save(self, commit=True): instance = forms.ModelForm.save(self) instance.actors_set.clear() for actor in self.cleaned_data['actors']: instance.actors_set.add(actors) return instance This allowed me to add m2m links from the other side of the defined m2m connection. Now I want to edit the entry. I've been using a generic function: def generic_edit(request, modelname, object_id): modelname = modelname.lower() form_class = form_dict[modelname] return update_object(request, form_class = form_class, object_id = object_id, template_name = 'createdit.html' ) but this pulls in all the info except the many-to-many selections saved to this object. I think I need to do something similar to this: http://stackoverflow.com/questions/1700202/editing-both-sides-of-m2m-in-admin-page, but I haven't figured it out. How do I use the generic update_object to edit the other side of many-to-many link?

    Read the article

  • Best approach to design a service oriented system

    - by Gustavo Paulillo
    Thinking about service orientation, our team are involved on new application designs. We consist in a group of 4 developers and a manager (that knows something about programming and distributed systems). Each one, having own opinion on service design. It consists in a distributed system: a user interface (web app) accessing the services in a dedicated server (inside the firewall), to obtain the business logic operations. So we got 2 main approachs that I list above : Modular services Having many modules, each one consisting of a service (WCF). Example: namespaces SystemX.DebtService, SystemX.CreditService, SystemX.SimulatorService Unique service All the business logic is centralized in a unique service. Example: SystemX.OperationService. The web app calls the same service for all operations. In your opinion, whats the best? Or having another approach is better for this scenario?

    Read the article

  • Uses for static generic classes?

    - by Hightechrider
    What are the key uses of a Static Generic Class in C#? When should they be used? What examples best illustrate their usage? e.g. public static class Example<T> { public static ... } Since you can't define extension methods in them they appear to be somewhat limited in their utility. Web references on the topic are scarce so clearly there aren't a lot of people using them. Here's a couple:- http://ayende.com/Blog/archive/2005/10/05/StaticGenericClass.aspx http://stackoverflow.com/questions/686630/static-generic-class-as-dictionary

    Read the article

  • Can't Use Generic C# Class in Using Statement

    - by Eric J.
    I'm trying to use a generic class in a using statement but the compiler can't seem to treat it as implementing IDisposable. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Objects; namespace Sandbox { public sealed class UnitOfWorkScope<T> where T : ObjectContext, IDisposable, new() { public void Dispose() { } } public class MyObjectContext : ObjectContext, IDisposable { public MyObjectContext() : base("DummyConnectionString") { } #region IDisposable Members void IDisposable.Dispose() { throw new NotImplementedException(); } #endregion } public class Consumer { public void DoSomething() { using (new UnitOfWorkScope<MyObjectContext>()) { } } } } Compiler error is: Error 1 'Sandbox.UnitOfWorkScope<Sandbox.MyObjectContext>': type used in a using statement must be implicitly convertible to 'System.IDisposable' I implemented IDisposable on UnitOfWorkScope (and to see if that was the problem, also on MyObjectContext). What am I missing?

    Read the article

  • Adding x11vnc as a Solaris SMF service

    - by rojanu
    I am trying add x11vnc as SMF service but cannot get service to start. I tried googling but couldn't find anything that could help me. Here is the startup script #!/sbin/sh # # Copyright (c) 1995, 1997-1999 by Sun Microsystems, Inc. # All rights reserved. # #ident "@(#)x11vnc 1.14 06/11/17 SMI" case "$1" in 'start') #/usr/local/bin/x11vnc -geometry 1280x1024 -noshm -display :0 -ncache 10 -noshm -shared -forever -o /tmp/vnc_remote.log -bg /usr/local/bin/x11vnc -unixpw -ncache 10 -display :0 -noshm -shared -forever -o /tmp/vnc_remote.log ;; 'stop') /usr/bin/pkill -x -u 0 x11vnc ;; *) echo "Usage: $0 { start | stop }" ;; esac exit 0 and here is the manifest file <?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> <service_bundle type='manifest' name='vnc'> <service name='application/x11vnc' type='service' version='0'> <create_default_instance enabled='true'/> <single_instance/> <dependency name='docusp' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/milestone/multi-user-server:default'/> </dependency> <exec_method name='start' type='method' exec='/lib/svc/method/x11vnc' timeout_seconds='0'> <method_context/> </exec_method> <exec_method name='stop' type='method' exec=':true' timeout_seconds='10'> <method_context/> </exec_method> <stability value='Evolving' /> <property_group name='startd' type='framework'> <propval name='ignore_error' type='astring' value='core,signal'/> </property_group> </service> </service_bundle> and the log file Usage: /lib/svc/method/x11vnc { start | stop } [ Nov 16 19:35:52 Method "start" exited with status 0 ] [ Nov 16 19:35:52 Stopping because all processes in service exited. ] [ Nov 16 19:35:52 Executing stop method (:kill) ] [ Nov 16 19:35:52 Executing start method ("/lib/svc/method/x11vnc") ] Usage: /lib/svc/method/x11vnc { start | stop } [ Nov 16 19:35:52 Method "start" exited with status 0 ] [ Nov 16 19:35:52 Stopping because all processes in service exited. ] [ Nov 16 19:35:52 Executing stop method (:kill) ] [ Nov 16 19:35:52 Executing start method ("/lib/svc/method/x11vnc") ] Usage: /lib/svc/method/x11vnc { start | stop } [ Nov 16 19:35:52 Method "start" exited with status 0 ] [ Nov 16 19:35:52 Stopping because all processes in service exited. ] [ Nov 16 19:35:52 Executing stop method (:kill) ] [ Nov 16 19:35:52 Restarting too quickly, changing state to maintenance ] Any Ideas?

    Read the article

  • ASP.NET MVC Generic Controllers and Spring.NET

    - by Jason
    Hello, I am creating an application using ASP.NET MVC (2) and Spring.NET. Since most of my Controller implementations just implement the similar CRUD operations, I would like to just create a single Generic controller, as explained here: http://stackoverflow.com/questions/848904/in-asp-net-mvc-is-it-possible-to-make-a-generic-controller However, the above example doesn't take DI frameworks into consideration. What I'm thinking is to create this (warning: this is an ugly mass of code I need help with): public SpringGenericControllerFactory : DefaultControllerFactory { public IController CreateController(RequestContext requestContext, string controllerName) { // Determine the controller type to return Type controllerType = Type.GetType("MyController").MakeGenericType(Type.GetType(controllerName)); // Return the controller return Activator.CreateInstance(controllerType) as IController; } } The entries in objects.xml would look something like this: <object id="controllerFactory" type="Application.Controllers.SpringGenericControllerFactory" /> <object id="DepartmentController" factory-method="CreateController" factory-object="controllerFactory" /> Can anyone pick through this and offer advice?

    Read the article

  • How to create a complete generic TreeView like data structure

    - by Nima Rikhtegar
    I want to create a completely generic treeview like structure. some thing like this: public class TreeView<T, K, L> { public T source; public K parent; public List<L> children; } as you can see in this class source, parent and also the children, all have a different generic data type. also i want my tree view to have unlimited number of levels (not just 3). this way when i want to work with my nodes in the code, all of them are going to be strongly typed. not just objects that i need to convert them to their original type. is it possible to create this kind of structure in c#, a treeview which all of its nodes are strongly typed? thanks

    Read the article

  • Doing a generic <sql:query> in Grails

    - by melling
    This is a generic way to select data from a table and show the results in an HTML table using JSP taglibs. What is the generic way to do this in Grails? That is, take a few lines of SQL and generate an HTML table from scratch in Grails, including the column names as headers. <sql:query var="results" dataSource="${dsource}" select * from foo </sql:query (# of rows: ${results.rowCount}) <table border="1" <!-- column headers -- <tr bgcolor=cyan <c:forEach var="columnName" items="${results.columnNames}" <th<c:out value="${columnName}"/</th </c:forEach </tr <!-- column data -- <c:forEach var="row" items="${results.rowsByIndex}" <tr <c:forEach var="column" items="${row}" <td<c:out value="${column}"/</td </c:forEach </tr </c:forEach </table The solution to this was answered in another StackOverFlow question. http://stackoverflow.com/questions/425294/sql-database-views-in-grails IF SOMEONE WRITES A GOOD ANSWER, I'LL ACCEPT IT. I would like a 100% acceptance on all of my questions.

    Read the article

  • Just in time debugger is popping up when debugging service client

    - by MAHESH K .M
    I have created as WCF service and hosted in IIS . This service is calling from another web application. When I am trying to debug the service calling event in the web application, the Just-in-Time debugger is popping up. It is running fine in the normal mode. Only in the debug mode the service is not running and JIT debugger is popping up also Why it happens? How to debug the service call in this scenario? The service is in .NET 4 and the web application is in .net 1.1 Thanks in advance Mahesh.

    Read the article

  • Generic List .First not working LINQ

    - by Hurricanepkt
    var stuff = ctx.spReport(); var StuffAssembled = new List<ReportCLS>(); var val = new List<ReportCLS>(); foreach (var item in stuff) { StuffAssembled.Add(new ReportCLS(item)); } val.Add(StuffAssembled.First()); Keeps throwing System.Collections.Generic.List' does not contain a definition for 'First' and no extension method 'First' accepting a first argument of type 'System.Collections.Generic.List' could be found (are you missing a using directive or an assembly reference?) what is going wrong ? moreover how do i fix it? Thanks

    Read the article

  • Why my WCF Service returns xml serialized objects?

    - by user294554
    Hi, I'm new here and I hope anyonte can help me. I have WCF Service and Windows Forms working with this client written in VB.NET. The Service class started to return xml serialized objects, but all my classes on Service side are DataContract-s and the service class is DataContractFormat. I googled everywhere about serializations and I couldn't find reason why it started to do that. I checked my classes and service, app.config file, but I couldn't find anything. I checked Reference.vb class, and it's System.Xml.Serialization.XmlElementAttribute everywhere. The question may seem dummy, but I really don't know what to do. I just want to know what can cause the service to act like that. Thank you.

    Read the article

  • Initialize generic object from a System.Type

    - by CaptnCraig
    I need to create a generic type, but I do not know the type at compile time. I would like to do this: Type t = typeof(whatever); var list = new List<t> this won't compile, because t is not a valid type. But it does know all about a valid type. Is there a way to dynamically create the generic list from a System.Type like this? I may need reflection, and that's ok, I am just a bit lost here.

    Read the article

  • Accessing properties through Generic type parameter

    - by Veer
    I'm trying to create a generic repository for my models. Currently i've 3 different models which have no relationship between them. (Contacts, Notes, Reminders). class Repository<T> where T:class { public IQueryable<T> SearchExact(string keyword) { //Is there a way i can make the below line generic //return db.ContactModels.Where(i => i.Name == keyword) //I also tried db.GetTable<T>().Where(i => i.Name == keyword) //But the variable i doesn't have the Name property since it would know it only in the runtime //db also has a method ITable GetTable(Type modelType) but don't think if that would help me } } In MainViewModel, I call the Search method like this: Repository<ContactModel> _contactRepository = new Repository<ContactModel>(); public void Search(string keyword) { var filteredList = _contactRepository.SearchExact(keyword).ToList(); } I use Linq-To-Sql.

    Read the article

  • Which pattern to use for logging? Dependency Injection or Service Locator?

    - by andlju
    Consider this scenario. I have some business logic that now and then will be required to write to a log. interface ILogger { void Log(string stuff); } interface IDependency { string GetInfo(); } class MyBusinessObject { private IDependency _dependency; public MyBusinessObject(IDependency dependency) { _dependency = dependency; } public string DoSomething(string input) { // Process input var info = _dependency.GetInfo(); var intermediateResult = PerformInterestingStuff(input, info); if (intermediateResult== "SomethingWeNeedToLog") { // How do I get to the ILogger-interface? } var result = PerformSomethingElse(intermediateResult); return result; } } How would you get the ILogger interface? I see two main possibilities; Pass it using Dependency Injection on the constructor. Get it via a singleton Service Locator. Which method would you prefer, and why? Or is there an even better pattern? Update: Note that I don't need to log ALL method calls. I only want to log a few (rare) events that may or may not occur within my method.

    Read the article

  • Retrieving the MethodInfo of of the correct overload of a generic method

    - by Anne
    I have this type that contains two overloads of a generic method. I like to retrieve one of the overloads (with the Func<T> parameter) using reflection. The problem however is that I can't find the correct parameter type to supply the Type.GetMethod(string, Type[]) method with. Here is my class definition: public class Foo { public void Bar<T>(Func<T> f) { } public void Bar<T>(Action<T> a) { } } And this is what I've come up with, unfortunately without succes: [TestMethod] public void Test1() { Type parameterType = typeof(Func<>); var method = typeof(Foo).GetMethod("Bar", new Type[] { parameterType }); Assert.IsNotNull(method); // Fails } How can I get the MethodInfo of a generic method of which I know the parameters?

    Read the article

  • Communicate between service and winform

    - by Richard Tivey
    I could do with a bit of help with a windows service im writing in c#. The service basically just runs various tasks on a schedule. It has 3 main sections: a class which contains everything for the task (config, code to be executed when it runs, etc), the service which contains instances of the tasks, running them on a timer and a windows form which is used to configure the settings for the task. The question I have is would it be possible to reference the service from the Winform whilst the service is running? Ultimately I want to be able to open the Winform and see a live status of what the service is currently doing. I've considered writing something network related to get around it but it didn't seem correct considering that both processes would be on the same machine.

    Read the article

  • Calling asynchronous methods from wcf service

    - by hima
    In my asp.net application, I am using wcf service to get all the business logic. I am using that service reference in my application to work with that. Now adding that service reference is giving another option Update service reference is giving Generate asynchronous operations. If I check the option and add the service will it generate asynchronous methods for my existing service. If so how do I use the metohd. Let me know the way for that. Thanks, Hima.

    Read the article

  • Interface with generic parameters- can't get it to compile

    - by user997112
    I have an interface like so: public interface MyInterface<E extends Something1> { public void meth1(MyClass1<E> x); } and I have a subclass whose superclass implements the above interface: public class MyClass2<E extends Something1> extends Superclass{ public MyClass2(){ } public void meth1(MyClass1 x) { // TODO Auto-generated method stub } } superclass: public abstract class Superclass<E extends Something1> implements MyInterface{ MyClass1<E> x; protected E y; public Superclass(){ } } the problem is that the parameter for meth1() is supposed to be generic. If I do MyClass1 it doesn't like it and the only way I can get it to compile is by leaving out generic parameters- which feels wrong. What's going wrong?

    Read the article

  • using AutoCompleteTextField in wicket without String as the generic type

    - by Manuel
    Hi! This question follows this: handling to onchange event of AutoCompleteTextField in wicket I'm trying to use the AutoCompleteTextField with a custom class as the generic type, and to add an AjaxFormComponentUpdatingBehavior. What I mean is I want to have a AutoCompleteTextField<SomeClass> myAutoComplete = ...; and after that add a AjaxFormComponentUpdatingBehavior: myAutoComplete.add(new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println( "Value: "+getValue() ); } }); The problem is that for some reason, adding that behavior makes the form try to set the model object with a String (even though the AutoCompleteTextField has a generic type of SomeClass), causing a ClassCastException when the onchange event fires. Is there a way to use AutoCompleteTextField without it being AutoCompleteTextField<String>? I couldn't find any example. Thanks for your time! and thanks to the user biziclop for his help in this matter.

    Read the article

  • Generic Dictionary - Getting Convertion Error

    - by pm_2
    The following code is giving me an error: // GetDirectoryList() returns Dictionary<string, DirectoryInfo> Dictionary<string, DirectoryInfo> myDirectoryList = GetDirectoryList(); // The following line gives a compile error foreach (Dictionary<string, DirectoryInfo> eachItem in myDirectoryList) The error it gives is as follows: Cannot convert type 'System.Collections.Generic.KeyValuePair<string,System.IO.DirectoryInfo>' to 'System.Collections.Generic.Dictionary<string,System.IO.DirectoryInfo>’ My question is: why is it trying to perform this conversion? Can I not use a foreach loop on this type of object?

    Read the article

  • MVC Display Template for Generic Type

    - by Kyle
    I am trying to use the model ListModel as a generic list model. I would like to enter on the page @Html.DisplayForModel() However the MVC is not correctly finding the templated file "ListModel.cshtml". It must work differently for generic models. What should I name the templated file in order for it to correctly be located? public class ListModel<T> { public IEnumerable<T> Models {get;set;} public string NextPage {get;set;} } I would expect it to look for "Shared/DisplayTemplates/ListModel.ascx" but it doesn't. Does anyone know?

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >