|
Are you running the client on the same machine as the server? If not the localhost in the url is wrong.
Also the url contains two forward-slashes where they should not be: http://localhost//Service/service.msc
I assume this is a typo, but thought it worth mentioning just in case.
|
|
|
|
|
Yes i am accessing client on the same machine.
sorry typo error when composing a message but my REST client is having the following URL
http://localhost/Service/service.msc
Even i tried from different machine with the following
http://172.29.xxx.xx/Service/service.msc
In both scenarios i am getting the following page saying my service living but not able to post a request.
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http:
This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:
C#
class Test
{
static void Main()
{
CDataServiceClient client = new CDataServiceClient();
client.Close();
}
}
Visual Basic
Class Test
Shared Sub Main()
Dim client As CDataServiceClient = New CDataServiceClient()
' Use the 'client' variable to call operations on the service.
' Always close the client.
client.Close()
End Sub
End Class
when i try to access its method by the following
http://172.29.xxx.xx/Service/service.msc/methodcall
[method :POST]
{
"json format inputs"
}
modified 15-Feb-12 5:52am.
|
|
|
|
|
hello guys, please am currently designing a test website with asp.net(vb)and i also have webservice that i placed all my connections, but the problem am currently having is that whenever i run the webservice to test what i have done it always bring an error, please what can i do. below is the code am talking about.
<WebMethod()> Public Sub InsertInfo(ByVal Name As String, ByVal picbox As FileUpload)
Dim mycon As New SqlConnection(conStr)
Dim img As FileUpload = CType(picbox, FileUpload)
Dim imgByte As Byte() = Nothing
If img.HasFile AndAlso Not img.PostedFile Is Nothing Then
Dim file As HttpPostedFile = picbox.PostedFile
imgByte = New Byte(file.ContentLength - 1) {}
file.InputStream.Read(imgByte, 0, file.ContentLength)
End If
mycon.Open()
Dim cmdText As String = "Insert into tblSave([Name],picture) VALUES(@Name,@pix)"
Dim cmd As New SqlCommand(cmdText, mycon)
cmd.Parameters.AddWithValue("@Name", Name.Trim())
cmd.Parameters.AddWithValue("@pix", imgByte)
cmd.ExecuteScalar()
End Sub
|
|
|
|
|
What's the error message, in which line does it arise?
|
|
|
|
|
@bernhard hiller below is the error message
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The XML element 'EnableTheming' from namespace 'http://xbf.com/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: The XML element 'EnableTheming' from namespace 'http://xbf.com/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.]
System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(INameScope scope, Accessor accessor) +849987
System.Xml.Serialization.XmlReflectionImporter.AddUniqueAccessor(MemberMapping member, INameScope elements, INameScope attributes, Boolean isSequence) +84
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1553
[InvalidOperationException: There was an error reflecting property 'EnableTheming'.]
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +2167
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1415
[InvalidOperationException: There was an error reflecting type 'System.Web.UI.Page'.]
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1621
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +10296
System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter) +139
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1273
[InvalidOperationException: There was an error reflecting property 'Page'.]
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +2167
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +223
System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +460
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1415
[InvalidOperationException: There was an error reflecting type 'System.Web.UI.WebControls.FileUpload'.]
System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1621
System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +10296
System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +722
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +236
[InvalidOperationException: There was an error reflecting 'picbox'.]
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +843
System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access) +130
System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess) +223
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +1971
[InvalidOperationException: Method Service1.InsertInfo can not be reflected.]
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +6527
System.Web.Services.Description.SoapProtocolReflector.ReflectMethod() +91
System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding) +1798
System.Web.Services.Description.ProtocolReflector.Reflect() +703
System.Web.Services.Description.ServiceDescriptionReflector.ReflectInternal(ProtocolReflector[] reflectors) +394
System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +109
System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri) +156
System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +284
System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) +50
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +77
[InvalidOperationException: Unable to handle request.]
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +285
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +183
[InvalidOperationException: Failed to handle request.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +354
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +212
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +47
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
|
|
|
|
|
Hi Guys,
Are you still working on some ASP Classic codes?
I am working on file upload in ASP Classic (not ASP.Net). And I am declaring my form as follows:
Problem: (when using ENCTYPE="multipart/form-data)
Response.Write(Request.Form("txtSample")) '--- returns blank
of course removing the "multipart/form-data" will solve the issue, but I am working on file upload and I need that.
Is there a work around where I can get the value of input text after clicking the submit?
Thanks
hifiger2004
|
|
|
|
|
Hi to all,
How to withdraw money from PayPal.
Thanks
Farogh Haider
Web developer
|
|
|
|
|
Hi Experts,
I need to find whether the TLS is enabled or not. If it is not enabled, i have to show some message. Kindly guide me any sugessions.
Regards.
|
|
|
|
|
Assuming you don't mean Theatrical Lighting Systems or Top Law Schools, you still need to provide a bit more detail.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi,
I have created a simple ASP.NET web application project in VS2010
Now I am just trying to add a web control but getting this error:
Could not find part of the path.....
Kindly Help...
|
|
|
|
|
|
i am designing share trading application in C# using asp.net framework, i wnna know how i should start it and which areas it must cover.kindly answer...!
|
|
|
|
|
You need to talk to someone who knows the domain and then ask him for advice on what to put into your application.
|
|
|
|
|
You could start with this[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi,
Our application receives datas from 2 application and it is stored in SQL database.
Some times in a table the column may be there or may not be there.Some times row may or may not be there.
How to handle such situation in asp.net?
I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures.
Guhananth.S
|
|
|
|
|
Did you check for number of columns and number of rows?
e.g.
DataTable dtData= YourClass.GetDataTable("select * from yourtableName");
if(dtData.Columns.Count==0){return;}
if(dtData.Rows.Count ==0){return;}
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
in that insert query fire and data to fetch connection class to use and easily get it
|
|
|
|
|
Hi, after all the searches I managed to create a bread crumb using the link http://www.codeguru.com/vb/vb_internet/aspnet/article.php/c6851
but the bread crumb information gets lost on postback. I dont know how to store the information in page level so I could maintain it. could someone please give me some direction as to how I can solve it.
|
|
|
|
|
My idea would be to have all the breadcrumb values & logic in a separate class(if it isnt) and decouple it from UI element. then store the object of ur values & logic class in say viewstate/session and then on postbacks repopulate the UI elements with the stored values.
Or, just use sitemappath if u are using asp.net
|
|
|
|
|
Please help me out here this is the link of the website www.tippyclothing.com, where i want to incorporate this payment gateway. if anyone will help me here i would be really thankful.
|
|
|
|
|
|
Hi
I am currently using Comm100 to chat with site's visitors but i want to ask if there is a better & free chat system to integrate with an asp.net website?
Thanks,
Jassim
|
|
|
|
|
I have 6 user controls on .aspx page and i have a button on .aspx page and all the user controls in update panel with updatemode conditional and each user control in Update panel, when i click on button , i need to referesh fisrst usercontrol.
Regards,
Vishnu.
|
|
|
|
|
I think the best to do that, expose a public method like Refresh/Reload etc in user controls and when user click on button then call that method. Other way is, call put each control in separate Update Panel then call like UpdatePanel1.Update().
Please let me know if you have other concern/requirement.
Parwej Ahamad
|
|
|
|
|
You assign a trigger to the button, and tell the trigger which update panel to update.
|
|
|
|
|