.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

A question about Service.Dependencies

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :


SQL Server 2008 Dev SP1 (Dev2008) + SQL Server Express with advanced services 2008 (RTM)

Visual Studio 2008 Standard

I am studying (again) the Service class ( namespace Microsoft.SqlServer.Management.Smo.Wmi ) and i have some problems with the Dependencies property;For each service , i obtain that the Dependencies StringCollection has only one string ( value = System.String[] ), which is a surprising value.

Here is my code :

     static void Main(string[] args)
        String[] p_strarray = null;
        Boolean p_boolean = false;
        Int32 p_i = 0;
        Property p_prop0 = null;
        String p_s = "";
        Service p_service = null;
        if ( !CommonCls.AppInit("en-US") )
          goto EndOfProgram;
        ManagedComputer p_mc = new Managed

View Complete Post

More Related Resource Links

web service soap mapper error question

Hi,I'm trying to connect to a web service using excel.I have currently no issues logging into the web service, and running one of the other functions to fetch a full list of data.  Once I am able to log in, the function returns a token, which I use to fetch data.But Currently, I'm getting the following errors one two of the functions:SoapMapper:Restoring data into SoapMapper ViewListResult failed HRESULT=0x80020009: Exception occurred. - Client:Unspecified client error. HRESULT=0x80020009: Exception occurred.Run-time error '-2147221504 (80040000)':SoapMapper:Restoring data into SoapMapper ViewListResult failedAny idea why I might be getting this error?  And also how I can fix it?  Thanks.

Question about WCF Service hosted in Windows Service

Hi, I have little experience with WCF and working on a projet that requires WCF Service instance to run 24x7. After searching for a solution and reading about WCF, I think if I host it under Windows Service I can have a single instance of WCF Service running 24x7. Is this correct? I just successfully ran the MSDN sample project that hosts CalculatorService in Windows Service. I realized that Windows Service cannot communicate with WCF Service it is hosting (I do not have any experience with writing Windows Service). I wrote a test function (public) in Windows Service and tried to call it from WCF Service but it did not appear in the Intellisense list. Is my assumption correct or is there a way to establish communication between Windows Service and its hosted WCF Service? Thanks. kr

SQL Server 2008 R2 Installation and Service Pack 1 Question

I am migrating a SQL 2000 server to a SQL 2008 R2 server (on different physical servers) . When I ordered SQL Server 2008 the volume licensing allowed me to download sql server web 2008, sql server web 2008 R2 and sql server 2008 service pack 1. I don't know why I have three options to download. Don't I just need to just install the sql server 2008 Web R2? Are there any sql 2008 R2 service packs available?   

Question on WCF service with Linq to SQL on 64-bit system

I'm trying this question one more time since I realized the work in in a 64-bit environment. I have a WCF service which runs in production in a 32-bit environment using VS2008 and .NET 2.0. We made a big change to our environment (lots at the same time) and I moved the services to VS2010, .NET 4.0, and 64-bit processes.  I wrote a new service and deployed it under IIS.  If I browse to the service I get the example screen and clicking on the link gives me the metadata.  So all of that is working. In my services I create a Linq to SQL context, perform a query, then return the result set as an Array.  I wrapped the context creation with a using.  My tests returned an exception "Attempt to access an object that has already been disposed".  I traced it down and found that the code executes, forces the query, returns the results, exits the using statement (disposing the context properly) then exits the method.  The next thing I get is the exception, inside framework code, and it is linq code attempting to fulfill the query once again. I have searched until I'm blue in the face trying to find prior incidents and fixes but all I found was one post, two years ago, same problem with less debugging, and no answer to the problem other than 'don't use the using statement' which is a bad suggestion.  So for a work around I wrote a Co

Web Service Response Question: < and > getting converted to > and >


Hi there,

I created a asmx web service which returns a string as response. The return response is as follows:

<?xml version="1.0" encoding="utf-8" ?> 
 <string xmlns="https://xyz.com"> <result>Success</result></string> 
 But when the client is doing http post they are getting the following response on their side:
<?xml version="1.0" encoding="utf-8" ?> 
 <string xmlns="https://xyz.com"> &lt;result&gt;Success&lt;/result&gt;</string> 
What should i be doing so that the client sees < and > instead of &lt; and &gt; ?

A quick question about protocols a WCF service can use


I am beginning to examine WCF, and like what I have seen so far.

I am intrigued, however, by something I recently read about WCF services being able to work with multiple protocols (and the example used included support for TCP and HTTP). Alas, I am so new at trying to figure out proper use of WCF, I don't know where to look for relevant information for my present query.

First, is it true? Can a WCF service handle both TCP/IP packets and http requests?

Second, I am also studying WinPcap, to learn how to examine TCP packets to see if there is a discrepancy between IP address data in those packets and the IP addresses in the HTTP headers (among other things).  I want to be able to redirect HTTP traffic through a site based on such an analysis of the TCP/IP packets used to make a given HTTP request.  I don't suppose there is already a class within .NET 4 that provides access to the complete TCP/IP packet that contains a given HTTP request (that would let me avoid having to compile the WinPcap code into a .NET app).  I guess the first question for this ought to be, is WCF the right technology to use for this?  Then, if WCF is appropriate for this, how would I establish the connection between multiple OSI layers?  If I can use WCF for this, can you provide URLs for resources that discuss how to do it?



question about sending form data to web service


Hello, i have some web service in outsource server (not on the form server) and i need to send to this web service few text boxes fill by the user (text only - no files) i need to send the data + the number 1 + some guid string (that not changing - the same guid always) is anyone have an idea how im doing that? ( all the data need to be sending to asmx file.

Newbie Question: Configuring WCF Service - Named Pipes Only for PubSub setup

I am refactoring an existing application and want to learn / move forward with WCF services contained within a Windows Service.  I have several WCF services that will only connect through Named Pipes - the client applications will receive information through callbacks - what is the proper way to keep the channel open - events may not occur for hours.  Is there a way to keep the session connection open until the clients have disconnected?

AJAX enabled WCF Service Question


From a pure html/javascript (jquery)/ajax client I need to access a WCF Service. For this reason I (probably) need to create an AJAX enable WCF Service.
Should I create an ASP.NET empty web application project and in this project add an AJAX enabled WCF Service or should I create an WCF Service Appication or WCF Service Library project and add in one of these projects my AJAX enabled WCF Service?



Sharepoint Service Applications question, architecture



I read an article in documentation:

When for example u want to use service applications you need to connect your service
applications to the WFE’s. This is done using a proxy (don’t think WCF/ASMX proxy… think of it
in the more generic term for now (as compared to 2007)).

I donnt exactly undestand this - so what is this proxy and what is communication Protocol between WFE and the application server?

Second question is if it is truth, then if there are two farms or more then could you search content through all of them using one Search Service Application? And would it be enough to have ONE search server in total and on the other farm there would be only some proxy to search sevice?

Debugging WCF service with x86 dependencies on a x64 bit machine

  I've got a WCF service that makes use of SQL compact edition -- which is only availible in 32 bit. The result is when I'm building and running on my x64 bit machine I have to tell the build system to build as x86 rather than "Any CPU". In the IDE, however, it seems like I loose a lot of functionality when I do this.

  For example, I have tests for all my WCF services using the IDE's built in testing framework. On my x86 machine it was great - I'd hit debug, the IDE would automatically start the WCF service in a local service host, and then if I'd set a breakpoint it would automatically stop. How sweet is that?

  But because of this x86 requirement, the IDE starts the WCF host process that is 64 bit, and that fails to load the x86 project... so it would seem that I've lost the ability to debug and step into my service automatically. This is too bad - this is a real productivity loss.

  Have others figure out a way around this? Thanks in advance for any advice!


Beginner Question on reporting service and deployment


Today is the first day that I am trying to create a simple report using SQL Server Reporting services. I god some issues and couple of questions and would like to ask here

1. I created a report model (with two relational tables). Can I create a report based on this report model? The reason, I like to give this model to users so that they can do their customize reports by drag and drop fields (This is similar to creating Universe in the Business object)

2. I created a test report in 'report server project' Using Visual studio (Which comes with SQL Server 2005 reporting service installation). When I try to run that report, it is asking me to define 'TargetServerURL'. I gave the same machine that I am  url (http://srv-test/reportserver), but still I am getting error. Is this the way that I should define? Or should I configure a new server with reporting services installed for deployment?

I know these questions are kind of stupid questions, but as a beginner, I need some basic help to start







Dreaming a world without any war in anywhere

Question about posting a file to a web service

I am trying to upload a file to a web service from an html file using post. If I set the enctype to multipart/form-data, then the fileName field is blank but the Files.Count=1. If I remove the enctype from the form, then fileName contains the string of the file name but Files.Count=0. Is there a way I can get both the file name and the actual file from the web service? public class Service1 : System.Web.Services.WebService { byte[] binaryWriteArray; [WebMethod(Description = "Description")] public bool UploadFileCollection() { HttpContext postedContext = HttpContext.Current; HttpFileCollection Files = postedContext.Request.Files; string fileName = (string)postedContext.Request.Form["fileName"]; if (Files.Count == 1 && Files[0].ContentLength >= 1 && fileName != null && fileName != "") { byte[] binaryWriteArray = new byte[Files[0].InputStream.Length]; Files[0].InputStream.Read(binaryWriteArray, 0,(int)Files[0].InputStream.Length); } return true; }

Question WCF Rest Service


Hi All,

I have question on WCF Rest Service, I have developed a WCF Rest Service and have two methods in it.

    [WebGet(UriTemplate = "GetInfo", ResponseFormat = WebMessageFormat.Xml)]   
    List<PersonalInfo> GetInfo();

    [WebInvoke(UriTemplate = "LoginUser/{UserId}",Method="Post", ResponseFormat = WebMessageFormat.Xml)]
    string LoginUser(string UserId);

First method uses WebGet ("GET") attribute and second method uses WebInvoke ("Post")

Question no 1:

           To test the first method I used IE and it is working fine. But how to test the second method, Is it true the at the second method cannot be tested     using IE?

Question no 2:

           Can we develop client application and add WCF rest service as Service refereces and test the functionality just like we do for other normal WCF      services?

            I tried but it is throwing so many errors!!!

Please clarify the above two questions?


Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Realizing a Service-Oriented Architecture with .NET

This article is meant to be a practical discussion guide to building a .NET application in a service-oriented architecture. We will consider real-world goals, real-world obstacles, and experience-based solutions. I quickly concede the approaches discussed here are not exhaustive or infallible. This paper is focused on application development, not application integration. We will specifically consider architectural issues and component design issues.

The Potential of Web Services
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