.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

A little advice with handling a login with wcf with other wcf services

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :.NET Framework
I'm relatively new to WCF and i' like some help/advice on how to proceed.
I'd like to create a login service with WCF with the credentials stored in a sql server 2008 r2 database.

The result of a successful login would ideally expose one of two WCF services, depending on the account type logged into.

The One of the two WCF services is a proper subset of the other one.  The both need to modify the tables, except one of them only has the rights to modify 1 table and the other has a much larger access (but still not complete).

So just so its clear:  One WCF gives access to a whole subtree of an account of database tables and the other is the one table in that subtree
So I have two major questions
How do i make a good and secure login?
My first inclenation is using a wsbinding with a certificate 
with the WCF code have a linq query with some async to prevent thread lock... but not entirely sure if this method is good.  Nor am i clear on the specific details to work properly.  Especially since the clients must be able to modify the database.
My second question is:
Since one of the WCF services will be a proper subset of the other one, should i worry about the second WCF service at all? What i mean by this is, is it safe to just deactivate the events

View Complete Post

More Related Resource Links

It's possible to using sharepoint services 3.0 hosted site without authentication login ?

It's that any way to able user read / write by without login authentication for sharepoint services 3.0. because i'm having problem when external user need to access to our sharepoint pages, but their can login to it.

Handling Events in Reporting Services View Contol

Hi There, I want to handle events like Key Stroke (OnKeyPress, OnKeyDown, OnKeyUp) or events like "Parameters Loaded", "Query Execution Begin", "Query Execution End", "Report Execution Begin", "Report Execution End" etc in the Report Manager View Control. Where can I find documentation on the possible events, e.g. I know I can code an OnInit procedure in the code block of the report. But how for example do I code the OnKeyDown procedure? I have tried: References: System.Windows.Forms Sub MeKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown msgbox("MeKeyDown") End Sub Gives me: [rsCompilerErrorInCode] There is an error on line 48 of custom code: [BC30590] Event 'KeyDown' cannot be found.   Sub MeKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Rs.KeyDown msgbox("MeKeyDown") End Sub Gives me: [rsCompilerErrorInCode] There is an error on line 48 of custom code: [BC30506] Handles clause requires a WithEvents variable defined in the containing type or one of its base types. Help me please!?!? Regards Jos

asp.net forms authentication with route handling - error, routes not recognized, returns to login


 I just created a small site with form authentication with route handling.  Without forms authentication, the pages route just fine.  With forms, it returns back to the login page as it is not one of my allowed locations specified in my web.config file.


I know I probably need to write a custom route handler.  Does anyone have an example I can follow for this?  Thanks.

Login Dialog box appears repeatedly -sql server 2000 reporting services


  We are running sql server 2000 with reporting services version 8.00.743.00.  Yes, I know it's old, but it works.  Anyway it worked up until a week ago.  Now when you try to render a report on IE 7 or 8 or Firefox,  the windows authentication appears multiple times. The report continues to render fine in IE 6.    
There are several posts on about this issue happening when deploying reports, but nothing about just running them.  There is also a service pack that I can apply that may address the issue.  I am leary about applying the service pack as it does not specifically address this issue. 
Any ideas ?

how to add a Event Handling in Windows SharePoint Services


Hi all,

   how to add a Event Handling In Share Point  for particular document library or list.

    actually i saw one article for restrict the deletion  i tried that article,

   i created one class library in that i added one class and two xml files(elements.xml and    feature.xml).

Code are give Below.


class file

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;

namespace EventHandlerExample1
  public class CancelAnnouncementDeleteHandler : SPItemEventReceiver
    public override void ItemDeleting(SPItemEventProperties properties)
      string HandledMessage = ("Announcements can not be deleted from this list");
      properties.ErrorMessage = HandledMessage;
      properties.Cancel = true;





<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

What are the exception handling best practices in workflow services

What are the best exception handling practices in workflow services declared in xamlx.
I have created an application, the service layer of the application has Xamlx workflow services hosted on IIS. Workflow services are calling data services through custom activities to get data. Exception could arise either in the workflow service or in custom activities or data services might throw exceptions. What is the best practice to handle declared and undeclared exceptions in the service layer.
At the UI, I have an Asp.net web application.

SQL Engine Services and Domain Accounts Used as the Service Login


Looking for detailed information on what resources the MS SQL Engine reads, writes, and modifies in order to operate as designed.  Read this carefully.  I've been on the search but am not finding anything quickly.

I believe if a Windows domain account is being used for any of the SQL Engine services that account should not have any granular permission settings on any folders related to SQL operations, nor any granular settings on the registry or any where else.  Should be FULL CONTROL.  Microsoft wrote the program to run the way it does and we should not be the judge of what permissoins a service account should have so the program runs correctly.

I am troubleshooting unstable SQL issues and I am finding little tips here and there pointing in my mind to be the service account having too many restrictions on the SQL folders, Windows registry, and everything else.

My opinion would be, any domain account used as a SQL service account should have FULL CONTROLL on any folders used for SQL operations and FULL CONTROLL on registry operations and be part of NO group policies.

If anyone knows where I may find detailed information that is written in GOLD as to what permissions SQL needs to run, let me know.  Send a link.  I think there should be NO restrictions.  I haven't met anybody yet that really understand

Installing and Uninstalling Services

Installing and Uninstalling Services.Unlike most projects you create in Visual Studio .NET, Windows Service projects cannot be run directly from the development environment by pressing F5. This is because the service in the project must be installed before the project can run.

You can quickly install your service application by using a command line utility called InstallUtil.exe.

Getting Started with Windows SharePoint Services

Of all of the capabilities of SharePoint, I thought I would start with the most basic installation - as a corporate intranet. It is likely that we will need to discuss some of the elements of SharePoint as we go along, so this also gives us the opportunity to review these elements for future reference.

Before going into too much detail, I would like to point out that you can try the core SharePoint framework (known as Windows SharePoint Services or WSS) for free. On Microsoft's Web site you can download a trial version of Virtual PC 2004 (VPC). Using VPC, you can install the Windows 2003 Evaluation Kit and the WSS add-on. This combination will give you 45 days to evaluate the setup.

Building a Searchable Phone Directory with Windows SharePoint Services

I want to continue to build out the intranet site we've started in our previous articles. A standard item in every intranet is a staff/employee list. Most companies implementing Windows SharePoint Services (WSS) are large enough to have a database that contains all employees. We will use the aggregation features of SharePoint to include data from this database into our intranet.


Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.

Global Exception Handling with ASP.NET

After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

New Features in Windows SharePoint Services 3.0

Windows SharePoint Services 3.0 (WSS 3.0) is the next version of WSS 2.0, released on 2007, and Microsoft Office SharePoint Server 2007 (MOSS 2007) is built on top of this. Windows SharePoint Services 3.0 takes full advantage of Microsoft ASP.NET 2.0 and the core Microsoft .NET 2.0 runtime. WSS 3.0 offers a lot of new features and programmability support. I have consolidated a list of new features and enhancements in the below section:

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

Returning a DataSet From a Web Services: Step-by-Step

This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.


This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.

.NET Web Services Tutorial

Visual Studio .NET makes .NET programming simple and accelerates the development process. It hides a lot of repetitive and configuration details from the user and improves productivity. However, sometimes you would like to program for .NET without using VS .NET; for example, you want to learn .NET framework programming and do not have access to VS .NET or you want to know what is actually going on under the hood.

Writing a Web Service in .NET using VS .NET very is easy. However, it is possible to write Web Services using the plain .NET SDK. I struggled a lot to write Web Services without VS .NET and tried to find help on the Net. There are a lot of examples available for writing Web Services using VS.NET, but you will rarely find any examples of writing Web Services using only the .NET SDK. This article is exactly for this purpose. It looks at Web Services development using the .NET SDK alone.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend