Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Dear Friends

I want to develop an big project based on WCF and Mvc4. I have some question in my mind.
1.) What is the best approch?? It can be lead slowness issue?
2.) How to prevent unauthorized user to access Service url.
3.) I want keep control over Service Url.
4.) How can be check user is valid to access service url??
5.) How can i start to develop project??

I request you all please send some project or example to start my project.

Thanks in advance

What I have tried:

[EDIT]

Nothing
Posted
Updated 15-Sep-16 4:51am
v3
Comments
[no name] 15-Sep-16 9:37am    
"Gimme code" is not a question or a problem. Read the FAQ before posting.
F-ES Sitecore 15-Sep-16 10:20am    
WCF is a big topic, especially the security aspect. When I was learning WCF I got the Wrox book on it which runs to quite a few hundred pages and there is a whole section on security. There is no way I can distil all of that knowledge into a Quick Answer forum post so your best bet is to also get a book on WCF and go through it.

Quote:
I request you all please send some project or example to start my project.

If you just want code, search internet or hire a professional programmer.

If you want to learn programming, then go on and learn.
Advice:
- Forget about this project for now.
- Learn seriously the techniques for programming
- Practice a lot.
- When you are at ease, go back to your project.
 
Share this answer
 
Since others have said what you need to hear: Learn programming. I would continue and give you an overview of what you need to learn in order to get started on this or a similar project. Ok, have your answers in the following list:
Quote:
What is the best approch?? It can be lead slowness issue?
Drop Web Services. Instead of this, use ASP.NET Web API. I have personally stated on multiple occasions, that ASP.NET Web API is a much better approach as compared to Web Services. First of them being, Web API can be consumed from any platform using HTTP protocol — almost every framework supports networking and HTTP communication. Web Service does provide multiple solutions, like SOAP, but that isn't used anymore nowadays. Use JSON instead of XML too.
Quote:
How to prevent unauthorized user to access Service url.
One more time, where ASP.NET Web API beats Web Services. You just need to add one attribute to the actual endpoint (controller), and framework itself will handle the authentication for you.
[Authorize]
public class ServiceController : ApiController {
   // Your actions  and HTTP handlers here.
}

Authentication is possible in WCF too, but that is not as easy.
Quote:
I want keep control over Service Url.
Are you the web admin? If so, you already have that. I am starting to doubt this a bit — every programmer has the control over their service, unless they write the frameworks poorly.
Quote:
How can be check user is valid to access service url??
See the answer to your second question. Also, the user profile can hold the information about their subscription (if that is what you are looking for). Then you can allow them access, or deny them access based on your own logic.
Quote:
How can i start to develop project??
Download Visual Studio 2015 Community[^]. Good luck.

For more please read the following,
AuthorizeAttribute Class (System.Web.Mvc)[^]
 
Share this answer
 
v2
Comments
rajnish.d3006 15-Sep-16 12:17pm    
Thanks for your suggestion. But i am talking about WCF not Web Api..

Now one more question.
If i want to Design SOA architecture which is better WebApi or WCF.
Afzaal Ahmad Zeeshan 15-Sep-16 12:21pm    
In many cases, Web API is the best solution if you are also going to develop an ASP.NET MVC application. Mostly, WCF is based on client-server model, if that can be changed to a SOA, and Web API can have controllers as services and that all boils down to one thing — if you are going to have ASP.NET MVC application then there is no benefit of using WCF over Web API.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900