asp.net mvc - Where should the asmx variable be instantiated and stored in an mvc project? -


i added web reference new mvc project , wonder should instantiate , store web service can call functions in controllers. need provide credentials this:

examplewebservice webservice= new examplewebservice(); authsoaphd authsoaphd = new authsoaphd(); authsoaphd.strusername = "client"; authsoaphd.strpassword = "pwd"; webservice.authsoaphdvalue = authsoaphd; 

i want avoid doing every time want use web service.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -