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


Post New Web Links

Client Application Services - Role service cache time out bug

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :WPF
 
Hi All, For people using Client Application Services with WPF, be aware of this bug. You can configure the "cache time out" for roles to be fetched again from the service. (In the visual studio dialog, Properties -> Services -> Advanced) This means the roles are cached on the client (in a file). If the application asks for roles again, they are not fetched again for "cache time out" time. When you set this value, it goes into your App.config, transformed into seconds. So if you choose 1 minute, the App.config has: cacheTimeout="60".   However, when using the ClientRoleProvider (for instance to do something like clientRoleProvider.GetRolesForUser("SomeUser")), this cacheTimeOut is interpreted in Minutes, not seconds! To prove my point, check ClientRoleProvider.Initialize method:   string temp = config["cacheTimeout"]; if (!string.IsNullOrEmpty(temp)) _CacheTimeout = int.Parse(temp, CultureInfo.InvariantCulture);   Later on, in ClientRoleProvider.GetRolesFromDBUser (what's in a name?), you see: _CacheExpiryDate = cd.RolesCachedDateUtc.AddMinutes(_CacheTimeout);   Testing also shows this behavior. So be aware, and always put the value in minutes in your App.Config!   Regards, Koen


View Complete Post


More Related Resource Links

How to keep my Workflow alive only during the time my client application is running ?

  
Hi, I want to my workflow do some action when server  lose connection with client and at the same time client get exceptions about it. It is possible to implement some session mechanism or something like that with workflow service ? Regards Marcin

Cannot find Manage services under Service Application of Central admin

  
We have Intranet solution based on SharePoint 2010 small farm. Somehow we don't see Manage services on server under the Service Applications in the central admin. Portal seem to work otherwise fine. When we opened the page to browser http://servername:14082/_admin/Server.aspx we received error: Access denied. We have tried to login with Admin, SP_Farm and SP_Admin user, but access denied every time. I checked who have Full user rights in the Central admin. It is SP_Admin Admins of the Sitecollection is SP_admin and Administrator. Why this happens?Kenny_I

Consume WCF Data service in client application

  
Hi All, I am working on WCF Data service which imported stored procedure, as below.         [WebGet]        public List<GetMTSearchResultTest_Result> GettMTSearchResultTest()        {            MediaMarketResearch_PRODEntities ent = new MediaMarketResearch_PRODEntities();            return ent.GetMTSearchResultTest().ToList();        } when i consuming this in my client application it says error as "The closed type MMRClient.MMRServiceReference.GetMTSearchResultTest_Result does not have a corresponding element settable property." I am getting this error while bind to the grid view as below. DataServiceContext context = new DataServiceContext(new Uri("http://localhost:4131/MMRDataService.svc/"));IEnumerable<GetMTSearchResultTest_Result> empResult = context.Execute<GetMTSearchResultTest_Result>(new Uri("http://localhost:4131/MMRDataService.svc/GettMTSearchResultTest"));             GridView1.DataSource = empResult;            GridView1.DataBind(); Note: I imported this sto

Consume WCF Data service in client application throws error

  
Hi All, I am working on WCF Data service which imported stored procedure, as below.         [WebGet]         public List<GetMTSearchResultTest_Result> GettMTSearchResultTest()         {             MediaMarketResearch_PRODEntities ent = new MediaMarketResearch_PRODEntities();             return ent.GetMTSearchResultTest().ToList();         }   when i consuming this in my client application it says error as "The closed type MMRClient.MMRServiceReference.GetMTSearchResultTest_Result does not have a corresponding element settable property." I am getting this error while bind to the grid view as below. DataServiceContext context = new DataServiceContext(new Uri("http://localhost:4131/MMRDataService.svc/")); IEnumerable<GetMTSearchResultTest_Result> empResult = context.Execute<GetMTSearchResultTest_Result>(new Uri("http://localhost:4131/MMRDataService.svc/GettMTSearchResultTest"));             GridView1.DataSource = empResult;             GridView1.DataBind(); Note: I im

Consume WCF Data service in client application throws error

  
Hi All, I am working on WCF Data service which imported stored procedure, as below.         [WebGet]         public List<GetMTSearchResultTest_Result> GettMTSearchResultTest()         {             MediaMarketResearch_PRODEntities ent = new MediaMarketResearch_PRODEntities();             return ent.GetMTSearchResultTest().ToList();         }   when i consuming this in my client application it says error as "The closed type MMRClient.MMRServiceReference.GetMTSearchResultTest_Result does not have a corresponding element settable property." I am getting this error while bind to the grid view as below. DataServiceContext context = new DataServiceContext(new Uri("http://localhost:4131/MMRDataService.svc/")); IEnumerable<GetMTSearchResultTest_Result> empResult = context.Execute<GetMTSearchResultTest_Result>(new Uri("http://localhost:4131/MMRDataService.svc/GettMTSearchResultTest"));             GridView1.DataSource = empResult;             GridView1.DataBind(); Note: I im

WCF Membership Authentication and Winform Client Application Services

  
I am needing more validation of what I am doing versus solving a problem. I have a winforms application that uses Client Application Services to validate a user against a customer membership provider all over SSL.  This works fine.  My winforms application validates correctly. The winforms application uses WCF to call services that are installed on the same IIS server that is providing the membership services for the Client Application Services.  The WCF services use wsHTTP binding, transport security, username credentials, and validate against the same membership provider as the Client Application Services. It appears that although the service and Client Application Services are at the same URL, they do not share credentials between them.  Ideally, once I log into Client Application Services, any calls to a WCF service at that location would be automatically authenticated.  However, this is not true.  I have to pass the username and password into the credentials for the WCF service.  This works as expected where the username and password are validated prior to allowing a service call.  On subsequent services calls, it does not validate again since it has established the secure channel. So, does this sound like the best approach?  Is there a way to pass credentials from the Client Application Services to WCF automatically?  I

Client Application Services and Man-in-the-Middle

  
Backgorund: I am using Client Application Services with a WPF client. The client talks to a Forms authenticated web site. I am using the Forms token to protect web services that the client uses to get information from the web site. I am protecting the web services with certificates, both server and client. Issue: All the web services are protected against man-in-the-middle attacks. The test I am using is to load Fiddler on the client and allow it to install certificates. The presence of fiddler as man-in-the-middle is detected by all the web services but not by the validation request of Client Application Services. I am able to read the user name and password from that message using Fiddler. How can I get client application services to use the certificates?

Need to create a service to allow client application to update their data

  

Hi,

I want to create a  WCF Service to transfer data to our clients application(WPF).

The Data I am trying to send is as follows.

ID  Code          Description   unit    Rate

1   104200000   LIVE GOAT      NOS     25

2   104200000   LIVE GOAT2    NOS    25

3   104200030   LIVE GOAT3    KGS     10

4   104202030   Water             LTR      5

and so on till ~ 11000 records.

What I have done so far is. Created a service which return a list of data.

-----------

 public List<Classes.TariffData> GetTariffData()
{
var currentTariffData = new List<Classes.TariffData>();

using (var myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
const string query = "select a.ID,a.Code,a.Description,a.unit,a.rate,a.rate3 from tariff.dbo.tariffdata a, tariff.dbo.code_history b where a.id = b.id and b.endofvalidity is null";
using (var myCommand = new Sq

Client Application Service

  

 

Hi,

we are in the process of architecting a security framework for our applications and we are looking at the Client Application Services availbale i .NET.

 

If I decide to use the ASPNETSQLMemebrshiprovider would i be able to use a single application service for all my applications.

 

if so when an application uses the the application service to authenticate how will it identofy which applicatio to authenticate against.

 

Any suggestions will be grealty appreciated.

 

Jothi

 


Client Application Services

  

I'm developing a Client Application using the Smart Client Software Factory; I've created a login form that implements the IClientFormsAuthenticationCredentialsProvider interface, I've also configured enabled the 'Client Application Services' on the project which is the main entry point.

The login form is displayed, and I supply login details yet the application can't authenticate?

I've place the same code in a simple (one project) winform application and pointed and all works?

has anyone see this behaviour before; it's driving me crazy

 

 


How to Consume WCF service In My CLient Application After Installing the WCF service at Production E

  

Hi,

 I ahve created the WCF service and Client Application To consume that Service and Everything Tested and working perfectly.

But to Giv that Application to the Client we have give the 2 Installer

1)Server Instller(WCF  Service Installer)

2) Client Installer having Some forms and Logic to consume WCF service.

 

My question is that..

While Installing the Service(WCF) service at production evnironment if they gives some name.

How my client Application Knows that Service?Is there any way to do that

Please Help me

--Regards,

Amar


Thanks&Regards, -Amar.

Return ReadOnlyCollection from WCF service and use it in Silverlight 3 client application

  
Hi all!

I have a solution containing of 3 parts: wcf service, wpf app and silverlight 3 app.
Both wpf app and silverlight app use wcf service to get a collection of objects.

The point is that my business requirements insistently tell me to return ReadOnlyCollection<T> from wcf service.
When I try to do it I have Serialization exception in silverlight client app. But it's ok in wpf app.

Then, I haven't started the investigation for such strange thing (different behavior in wpf and silverlight) and decided to implement custom serialization, returning the ICollection interface and trying to get ReadOnlyCollection on deserializing.  But wcf service proxy class in silverlight app returned Array of T, not ReadOnlyCollection<T> as proxy in wpf did.


So, the question is: Is it possible to return ReadOnlyCollection<T> from WCF service?



Any help is appreciate.

Thanks,
Dmitry

"Windows SharePoint Services Web Application" service is showing 'Error starting'.

  

I just installed MOSS SP2 and ran the config wizard on the server.
I am facing issue with our farm. Found that "Windows SharePoint Services Web Application" is in a problem.

I tried below commands:-
stsadm -o provisionservice -action stop -servicetype spwebservice -servicename ""
stsadm -o provisionservice -action start -servicetype spwebservice -servicename ""
But getting error:- Provision of service failed. Additional information: 1387.

Checked eventvwr and found below error log:-
Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Topology
Event ID: 7034
Date:  10/21/2010
Time:  5:16:10 AM
User:  N/A
Computer: <Servername>
Description:
An attempt to start/stop instance  of service Windows SharePoint Services Web Application on server <servername> did not succeed. Re-run the action via UI or command line on the specified server.

None of the sites are working and I cannot see anything in the IIS folder nor in the IIS manager. All application folders are missing. But, I can see all the sites & Content databasesin the Central Admin.

Can someone please help?

 


How can I resolve issues implementing Logout with WPF and Client Application Services?

  

I have recently been prototyping an application using WPF and Client Application Services.  I am trying to use all three features of the Client Application Services : Forms Authenticiation, Role Security, and Client Profile.  I have managed to get everything working, but I feel like my solution is a kludge and want a better way.

For the discussion assume the following:

I have two WPF windows:

The first window is my main Application form.  It has two buttons "Login" and "Check Thread Principal"

The second window is a login form which implements the IClientFormsAuthenticationCredentialsProvider interface to use the GetCredentials method to return a new ClientFormsAuthenticationCredentials object with the entered username and password.

The application starts, the Main Window is loaded and the user clicks the login button.  In the button click event, a call is made to System.Web.Security.Membership.ValidateUser(String.Empty, String.Empty).  This causes the GetCredentials method in my login form to be called which in turns shows the login window.  The code in the button click event of the main window waits until the user enters information in the login window.

Once the user submits the login information, the login form closes, the flow of execution is returned to the main window login cl

Analysys Services service stops all the time

  

Hi,

 

I'm having a problem, since SSAS is stopping two or three times a day, when Analysis Services Cube is processing. However, the same exact cube also processes sometimes without any problem.

 

The Event log is logging this error;

 

The description for Event ID ( 22 ) in Source ( MSSQLServerOLAPService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Internal error: An unexpected exception occured..

 

I went to see the log files SQLDUMPER_ERRORLOG.log in C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Log

And I see this every time the service goes down:

 

08/04/08 22:11:33, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 suppli

Authentication and ASPXAUTH size when using Client Application Services; MemberShip.ValidateUser alw

  

Apologies if this is the incorrect forum. Please let me know if it should have been posted elsewhere. Please let me know if I need to clarify anthing. Thanks in advance for any suggestions, direction pointing, etc.
-----
I have been using all three features of  client application services (authentication, profiles, and roles) in my windows app (DotNet 3.5 framework) for almost two years now. Up until now, I have not had any problems. This week I hit a brick wall and am pretty stumped with two seperate but related issues.

Issues:
In development, we decided to upgrade our websites/services to DotNet 4.0. All applications upgraded successfully. However we are unable to log into our application using Client Application services. No matter what user we use, Membership.ValidateUser returns false. Since we know the username and passwords, we thought this was strange. When debugging the application, we found that Membership.ValidateUser was throwing an InvalidOperationException (see below for complete exception) stating that the ASPXAUTH property was too long, longer that the schema created in the SQL/CE database. (See below for things tried).

In production .. A user all of the sudden could no longer gain access to the application. Upon inspection, his ASPXAUTH cookie was 264 characters long (9 characters longer than the schemas nvarchar(256)). E

WSDuelHttpBinding and multiple time messing between service and client in one session

  

i am very new in wcf.suppose my wcf service is hosted in real ip server.Clients will request to service through internet.

client will request to service.The service will authenticate the client.After receiving the request the service will do some processing(like database update,delete,insert) and send a lot amount of data to client.client will do some database action and send an acknowledgment to service.service will keep its in database as a record.I need to do it in a session  and in a transaction.How can i do this.

i choose WSDuelHttpBinding.i read about callback operation.but according to the above scenario i also need to callback to the service again to send acknowledgment . Please help me.it's urgent .

sabbir

 

 


Categories: 
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