1

I have a need coming up to write a small c# WPF application. Some of the processes it does will need to be called by an ASP.Net application.

My question is how do I setup something that the web application can call and set the wpf application to work?

OR should I create a separate class library that performs processes and reference this in both applications?

2 Answers 2

2

Yes; you should create a separate class library.

The class library should not reference WPF or ASP.Net assemblies.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I thought that might be best but wanted another opinion first as its the first time I've had to have two seperate types of application running the same process
1

If two separate applications need a set of common functionality, you're dead on the money in that you should refactor that common code into a library referenced by both. I think you'll save yourself a lot of headaches in the future this way.

My company has certain libraries that are variously called from our webapp, windows services, and even the odd scheduled task or console app. Each of these sources has different security requirements, different operating models (e.g., stateless public websites using ASP .Net Membership users versus stateful private console apps running as domain users or service accounts), and are hosted on different machines or machine types (e.g., cloud vs. local). Properly setting up your solutions and project references mean that MSBuild can do the deployments for you without having to worry about crossing all the various boundaries mentioned above.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.