0

I am developing a wcf rest service application,below is my uriTemplate.

http://localhost:50782/PhotoManager.svc/UploadPhoto/?fileName={fileName}&description={description}

Below is my url that is from client side,

http://localhost:50782/PhotoManager.svc/UploadPhoto/?fileName=001_003.jpg&description=D:\Image

But it shows error at underscore and slash.

2 Answers2

2

This may be related to the QueryString parameters not being escaped properly. From JavaScript you can use the encodeURIComponent function.

Dave R.
  • 7,106
  • 3
  • 27
  • 51
  • encoding is definitely necessary as the URI spec does not allow underscores anywhere in the URL. Dashes are ok though. – Sam Axe Feb 19 '15 at 04:33
0

Check with following code in your System.ServiceModal section in Web.Config -

<endpointBehaviors>
  <behavior name="web">
    <webHttp helpEnabled="true" />
  </behavior>
  </endpointBehaviors>
Rajat_RJT
  • 54
  • 6