473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

passing receipts to ws consumer

I'm fairly new to web services in .net/vs.

I'm wondering about a few ws things:
- should I create a new ws project for every ws?
- how do I best ensure that only selected consumers can use a ws?
- how do I best pass back receipts to the ws consumer?

Have googled the above, but with little success.
Hope someone can kick start me/point to a authoritative resource.

Morten
Feb 23 '07 #1
1 1152
I dont know whethet i would be able to explain properly but i have tried my
best.
First you need to create one webmethod called "LogOnToServer".This method
will take 4 parameters:
[1] username(string datatype)
[2]UserKey(which will be sessionId)
[3] errorcode(reference parameter)
[4] errormessage(reference parameter)
In this method you can write the logic to validate user credentials.That is
you need to maintain

one hashtable object.When for first tme end users calls this method then you
need to insert

UserName and userkey into that Hashtable.Userkey will be sessionId.For
sessionid to work you need

to write attribute EnableSession="true" in this webmethod.Now assign this
seesionid to reference

parameter userkey of this webmethod.Now all the other webmethods will have 4
extra

parameters(that is username,Userkey,errorcode and errormessage).When the end
user calls this

sensitive webmethod you can check in the previous hashtable whether for
particular

username,userkey(that is sessionid) is valid.If it is not valid then you can
return appropriate

errorcode/errormesage.Instead of hashtable you can do same thing through
database also.In this

way you can authenticate users.If you want further to increase security then
you can also

implement message level security.That is every soap messages that are sent
to and fro to web

services can be encrypted using Tripe DES.For this you will find following
link useful:
http://www.c-sharpcorner.com/UploadF...Service1116200

5021034AM/SOAPHeaderandSOAPExtensionsinaWebService.aspx

Hope this hepls you out.If you still have doubts then please let me know.
Thanks and regards,
Manish Bafna.
MCP and MCTS.

"Morten71" wrote:
I'm fairly new to web services in .net/vs.

I'm wondering about a few ws things:
- should I create a new ws project for every ws?
- how do I best ensure that only selected consumers can use a ws?
- how do I best pass back receipts to the ws consumer?

Have googled the above, but with little success.
Hope someone can kick start me/point to a authoritative resource.

Morten
Feb 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: J. L. Goddard | last post by:
1) Do c# web methods support default parameters ? 2) Can a web method, or a c# method such as: public nullTest( int i ) { return i++; }
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: rival | last post by:
Hi. I've a single solution with many projects. I'm using VS2003 and framework 1.1 1. Data project - contains UserData class, inheriting from DataSet, and setting up constants and columns...
9
by: Greger | last post by:
Hi, I am building an architecture that passes my custom objects to and from webservices. (Our internal architecture requires me to use webservices to any suggestion to use other remoting...
0
by: Nogusta123 | last post by:
My web service has a single method called "CheckEligibility". This method can be used to check a person's eligibility for multiple products. Each product has different data requiements so each...
4
by: mps | last post by:
It seems to me that the MSDN code for synchronizing a producer and consumer thread at http://msdn2.microsoft.com/en-us/library/yy12yx1f.aspx is completely wrong. There is no reason to assume that...
2
by: Ravi | last post by:
Hi People, I am facing an issue with printing where I have to print receipts of a custom size. Each receipt is about 8 inch by 4inch. I am using window.print(). When a receipt is printed another...
3
by: Subodh | last post by:
Hi All, In C++ we could pass a constant reference to a function so that the target function could not modify the objects passed eg. const classA & dummmyfunction(const classB) similar thing...
20
by: kpfunf | last post by:
Hey all, I have a table of receipts used (Table Name: receipts, Field Name: receiptNumber) and a table with receipts issued (Table Name: Receipts Batches, Field Names: BatchID, BegRng, EndRng)....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.