.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

Failed to connect wcf service using C++ and Curl

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :ASP.Net


I want to connect WCF service ("https://sandbox-wbapi.thesslstore.com/WBService.svc") with use of c++ and curl.

But i cannot get response from API means i could not connect the service.

I used following code snippet.

 * main.cpp
 *  Created on: 06.10.2010
 *      Author: root
#include <iostream>
#include <curl/curl.h>

using namespace std;

inline static
int WriteToString(char* ptr, size_t size, size_t nmemb, string* str)
	return str ? str->append(ptr, size * nmemb), size * nmemb : 0;

int main(int argc, char **argv) {

	string request("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
			"<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" "
			"xmlns:a=\"http://www.w3.org/2005/08/addressing\" "
			"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
			"<a:Action s:mustUnderstand=\"1\">https://sandbox-wbapi.thesslstore.com/WBService/ValidateResellerCredential"
			"<a:To s:mustUnderstand=\"1\">https://sandbox-wbapi.thesslstore.com/WBService.svc</a:To>"

View Complete Post

More Related Resource Links

Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

Enter your credentials to connect to the web service


When trying to publish an InfoPath 2007 form template (as a Content Type), I am getting the following message with a UserName/Password dialog box:
Enter your credentials to connect to the following web service: http://MySitePath/_vti_bin/Webs.asmx

When I enter my credentials, the above dialog box appears again. I have carefully entered my credential. Another thing I noticed that despite this error I see the form got created at the destination library. The only thing is that the Content Type did not get created and hence is not available in the "Site Content Type Gallery".

We are using Sharepoint 2007 enterprise edition. And I have recently published the InfoPath form templates several time as Content type without any issue.


Please help. Thanks........

While calling Web service gets exception "The request failed with HTTP status 401: Unauthorized"

Hi All, I created a ASP.NET web service, which was hosted on default visual studioserver, and on excecution of webservice it run .exe file which in turn update xml file. Now i hosted this webservice on IIS 6.0 server, and when i run the service, itfails to execute the exe.When i run it on debug mode, i never get any exception.Code...public string HelloWorld()    {        Process myProcess = new Process();        try        {            myProcess.StartInfo.UseShellExecute = false;            // You can start any process,             myProcess.StartInfo.FileName = @"E:\Projects\some.exe";            myProcess.StartInfo.CreateNoWindow = true;            myProcess.Start();            myProcess.Close();            myProcess.Dispose();            return "Suceess";         }&n

Error: The search request was unable to connect to the Search Service.

When attempting a search, I get the the error message "The search request was unable to connect to the Search Service. "  The search sevice has been started in Central Administration.  Does anyone have suggesting as to how to troubleshoot this issue?   Thank you in advance for your help.

Search service is not able to connect to the machine that hosts the administration component

I encounter the error above when trying to set up Sharepoint Server Search. I have tried both setting up search manually through Central admin (just selecting default for everything) as well as through Powershell (using this: http://stsadm.blogspot.com/2009/12/creating-sharepoint-2010-enterprise.html). I'm using the farm admin as Search account as well as account for Application pools, so I guess permissions should not be the issue.Creating new Search service application seems to be successful, but when going to Searchadministration after creation, then System status displays the error above. Event log does add any info and just displays same error message ("SearchApi.cs throws exception:The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component 'db397ab0-d9b0-46c4-9077-dc8be62bf586' in search application 'TNS Enterprise Search Service Application' is in a good state and try again."). I have found this http://blog.fpweb.net/sharepoint-2010-server-search-troubleshooting/ stating that the solution is not to use MSDN version of Windows 2008, but does give any explanation why.Any ideas would be appriciated.Best regardsThomas

sql server start service error "The request failed or the service didn't respond in a timely fashio

I cannot start sql server 2008 after repair windows. sql server (MSSQLSERVER) not start dialog message "The request failed or the service didn't respond in a timely fashion.Consult the event log or other applicable error logs for details"  I open even log (control panel >> administration >> event viewer) find error log with sql server it notice Could not open error log file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'. Operating system error = 5(failed to retrieve text for this error. Reason: 1815) I open file ERRORLOG.5 but I don't understand where I should fix?  I copy errorlog.5 on this webboard  Please help me! thank you   2010-08-20 08:16:52.89 Server      Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)  Jul  9 2008 14:43:34  Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3) 2010-08-20 08:16:52.89 Server      (c) 2005 Microsoft Corporation. 2010-08-20 08:16:52.89 Server      All rights reserved. 2010-08-20 08:16:52.89 Server      Server process ID is 2248. 2010-08-20 08:16:52.89 Server      Authentication mode is MIXED. 2010-08-20 08:16:52.89 Server  &

Unable to connect a web service from SharePoint 2010

Hi, I have a requirement to connect to a webservice from SharePoint 2010 without passing Network credentials explicitly. If i am already logged into the SharePoint 2010 portal , I should be able to click on Search (which is a web service which retrieves search results from Oracle UCM) and retrieve the result. I tried localhost.ServiceX myProxy = new localhost.ServiceX(); myProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; also myProxy.UseDefaultCredentials = True Still i am unable to authenticate. Default credentials returns null value.   Kindly help.

SQL2008 Installation error Service SQLBrowser start request failed

This relates to the Enterprise SQL 2008 Failover Cluster installation. After the initial setup reaches a near completion point the Setup receives the following Error has occurred: Service 'SQLBrowser start request failed. Click Retry to retry the failed action, or click Cancel to cancel this action and continue setup.

Search request unable to connect to the Search Service.

I have searched through other similiar topics and have not been able to get it working again properly. I've tried deleting the Search Service account out and all associated information and created a new one. My crawl logs show that they are successfull and that I have content available in my local sites, as well as my people listed. I have disabled loopback checks, given the default content access account owner access on the databases. Everytime I do a search, I get that error message listed as the subject. I'm running a 4 server farm setup with 1 DB, 1 App, and 2 WFE's. Everything was working fine and now I can't get back working right. I have hammering at it all day and need some additional input of where to look. I'm no SharePoint expert by any means, but I'm slowly getting used to everything. Please help!

Error Message: The attempt to connect to the report server failed. Check your connection informatio

I have a web page that contains a ReportViewer control.  I am trying to display a report, which is an .rdl file located on the SSRS server, in this ReportViewer control.  I have set the ReportPath and ReportServerUrl correctly.  I am getting an error message. Am I suppose to use an .rdlc file rather than a .rdl file?  Does the web server configuration need to use a certain account?  I am getting the following error message: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. The request failed with HTTP status 404: Not Found.

Infopath 2010 cannot connect to Rest web service

Hi all, I recently tried to access an Excel spreadsheet range as a Rest web service in Infopath 2010; no luck.  Here are the steps I followed: 1. [Successful] Upload Excel spreadsheet with the said ranges onto a Sharepoint document library 2. [Successful] Bind the Excel spreadsheet range (I have one called Regions) in the Sharepoint document library as a Rest web service in Infopath form's listbox control during design time as follows - http://mosscrm/sites/sandbox/_vti_bin/excelrest.aspx/eventbudgets/lookups.xlsx/model/ranges('Regions')?$format=atom 3. [Failed] Then I tried to preview the form, but the actual data in the Excel range failed to populate the Infopath listbox control.  The error I got was: "Could not open "http://<localhost>/sites/<site name>/_vti_bin/ExcelRest.aspx/EventBudgets/Lookups.xlsx/Model/Ranges('EventTypes')?$format=atom"   The error I then got from Infopath was a pop-up saying: The query cannot be run for the following DataObject: Event Types InfoPath cannot run the specified query. The file is not a valid XML file. Not enough storage is available to process this command . If anyone out there has experienced a similar issue and resolved it, please kindly share your solution approach. Thanks.



PassThrough authentication fails: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I've tried it with every AuthenticationMode! But no one seems to work correctly in my case. I thought that PassThrough should work with a preset User ID and password. This would be enough for the moment, but even this doesn't work!! With WindowsCredentials I get the following error: The Property with name 'SsoApplicationId' is missing on the LobSystemInstance. SsoApplicationId I tried to set this with the SharePoint SSO but I've no such services. How can I set this just for the current WindowsCredentials (of the current Sharepoint user)? With RevertToSelf I get the following error: "An error occurred while retrieving data from MyLOBInstance. Administrators, see the server log for more information." The server log contained no useful information for me. With PassTrough I get the following error: "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: <local machine>]" Why are the lines <Property Name="RdbConnection User ID" Type="System.String">MyDomain\Administrator</Property><Property Name="RdbConnection Password" Type="System.String">mYpAssWoRd</Property> being ignored? Everything (MOSS, SQLServer,...) is on a single machine, so I don't need to activate Kerberos, do I? <LobSystemInstance Name="SEPInstance1207">   <Properties>    <Property Name="DatabaseAccessProvider" Type="Micros

The search service is not able to connect to the machine that hosts the administration component

I'm expierencing this error message and am not sure what to do to fix this.  I don't want to break anything else on our farm.   The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component '9139bef7-69a3-4125-9d0e-e09484cc24ee' in search application 'Search Service Application' is in a good state and try again. Nothing appears under topology.  It just continues to load.  Any suggestions would be appreciated.

Failed to upgrade SQL 2K5 Express to Enterprise: Service 'MSSQL$OFFICESERVERS' could not be starte

Hello, I have a standalone SharePoint Server 2007 with SQL Server 2K5 Express and today I upgrade the SQL 2K5 Express to Enterprise with the command: setup.exe SKUUPGRADE=1. At the last, the wizard give me a error dialog saying the following error.  I search the Internet for half a day but in vain. Hope you can show me some idea. Thanks. TITLE: Microsoft SQL Server 2005 Setup------------------------------ Service 'MSSQL$OFFICESERVERS' could not be started. Verify that you have sufficient privileges to start system services. The error code is (1067) The process terminated unexpectedly. For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=setup.rll&EvtID=1067&EvtType=sqlsetuplib%5cservice.cpp%40StartServices%40sqls%3a%3aService%3a%3aStart%40x42b  Hope Helpful | Xiaofeng Wang | http://www.leoworks.net

The SQL Server service failed to start

Hi, I'm trying to install SQL Server2005 Express but get the following error:       The SQL Server service failed to start Attempts to start the service manually have failed. Pse advice. Thanks,tonyKM #######################################################Error Signature:####################################################### EventType: sql90setup  P1 : do_sqlscript  P2 : 0x733fP3: sqls__service__start P4 : 0x42b  P5 : sqlsetuplib_service.cpp@301 P6 : sqlca.dll@2005.90.1399.0 P7 : sqlrun_sql.msi@9.00.1399.06 #######################################################LOG File####################################################### Microsoft SQL Server 2005 9.00.1399.06 ============================== OS Version      : Microsoft Windows XP Professional Service Pack 2 (Build 2600) Time            : Mon Dec 05 17:18:40 2005  MKE303 : The current system does not meet recommended hardware requirements for this SQL Server release. For detailed hardware requirements, see the readme file or SQL Server Books Online.Machine         : MKE303 Product         : Microsoft SQL Server Setup Support Files (English) Product Version : 9.00.1399.06 Install        

The request failed or the service did not respond in a timely fashion. Consult the event log or othe



           Actually i have installed SQL Server 2008 R2 on XP Pro SP3 it works fine after instaling first time but when i restarted my pc SQL Server Service didn't restarted and so i tried to restart that manuly by clicking start in Sql Server Configuration Manager at that it gave this error "The request failed or the service did not respond in a timely fashion. Consult the event log or other application error logs for details."


I tried to repair it again but it doesent resolved .So i Uninstalled it SQL Server 2008 R2 and all its shared tools and installed it again but nothing changed it again gave me the same problem as in 1st instalation after restating maching.

      Any idea! Where i am going wrong?.

i got this thing in Event log of Application

Event 1

"FCB::RemoveAlternateStreamsByHandle(BackupSeek): Operating system error (null) occurred while creating or opening file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\transport.mdf'. Diagnose and correct the operating system error, and retry the operation."

Event 2


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