Caching WCF ChannelFactories For Multiple C# Users?

Jan 15, 2010

I have an enterprise system that is used by a handful of WinForms clients and a public-facing ASP.NET site. A backend WCF service provides several services to be consumed by each of these clients. The services require message credentials, which in the case of a WinForms app is supplied by the user when the program first starts.

I cache ChannelFactories in the WinForm apps for performance. I would like to do the same on the ASP.NET site. However, since ClientCredentials are stored as part of the factory (ChannelFactory<T>.Credentials), will I need to cache one ChannelFactory per service per user? It seems that even under moderate use that will add up quickly. Additionally, I believe I will need to store them at the application-level, not the session-level, since for future scalability I can't guarantee that I will always be using InProc session state.

View 2 Replies


Similar Messages:

Usercontrol Caching Viewstate Across Users?

May 25, 2010

I have a usercontrol with asp:textbox controls on it that also performs postbacks. If two users, who are both identified by a different session variable, postback the page within the same second, one user will see the other user's viewstate values in the text boxes. I have validated that this happens by setting a textbox, a session variable, and a cookie to the same value (the same value that identifies the user) and writing to the log when all three don't match. The text box's value is the one that is logged as the other user's value.ASP.net 3.5, IIS 6

View 2 Replies

Caching ASP.NET Users Related Data Within WCF Service?

Sep 17, 2010

My requirement is to call WCF web service from ASP.NET code behind and pass some data for example:void Add(int x, int y);Result of the operation should be somehow stored within WCF web service (member variable).
Later user should be able to call double Equals();and get the result of the operation. Of course since it's an open website many non-authenticated users can open the ASP.NET page and call the web service.
Alternatively Add method can return "key" that can be used to get result back,

[code]...

View 1 Replies

Caching Multiple Copies Of A Page

Sep 2, 2010

I have an aspx page that retrieves and processes an image based on a query string.The whole operation takes about 2-3 seconds. However as the nature of the images means they are quite static,a 5 min (or even 5 hour) delay in picking up an updated image is acceptable. Because of this delay I would like to cache the response and only do a proper refresh only periodically. I have added the following to the top of my aspx page. <%@ OutputCache Location="Any" Duration="600" VaryByParam="*" %> Only the last request appears to be cached - i.e. f I navigate to ../DisplayImage?ImageId=1Then the page is loaded and Image 1 displayed - subsequent requests are cached.If I navigate to ../DisplayImage?ImageId=2 subsequent requests are cached. However if I go image 1, image 2, image 1 then no caching occurs.

I'm wondering if i'm missing something obvious or does IIS7 / ASP.NET just not support this type of caching.

View 1 Replies

Database Dependent Caching W/ Multiple Databases/SqlServers?

Oct 6, 2010

I'm working in an environment where a single web application (running in a web-farm) dynamically connects to different SQL Server databases (possibly on different servers) based on user selection (this part is non-negotiable, unless you can gift me $1,000,000 and/or some kind of time altering device).

I'd like to cache some of the commonly used data from the database(s) in the application, such as "settings", and am looking for a best practice to use with the SqlCacheDependency class or a related database cache dependent solution (not opposed to a custom implementation of SQL notification or polling; notification is preferred over polling).

So far, I'm thinking of using a collection of SqlCacheDependency objects (one for each database) that can be referenced by connection string name or related key. So when the connection is changed to a different database, the cache can be requested/populated by a key of <databasekey>+<datakey> and use the appropriate SqlCacheDependency object (probably handled by a cache-managing wrapper).Or is it just better to take the hit and always go to the database?

View 2 Replies

State Management :: Caching The User Control Data Based On Multiple Parameters?

Feb 10, 2011

i have a usercontrol called navigationmenu whose data is static but varies with loged in1.empID 2.empType 3 Country my question is how can i cache the data of usercontrol based upon combination of these 3 parameters

View 9 Replies

Forms Data Controls :: Caching DataTable - Create/cache Multiple DataTables?

Jul 23, 2010

Among the many aspects of asp.net that I haven't focused my development on yet is caching. I have a perfect application for it now, I think, with a GridView that sits inside a repeater, and is bound in the Repeater ItemDataBound event. The contents of the GridView will remain static for each Repeater data item for each Client. The nature of the data in the GridView is that it can change from day to day per Client, but wouldn't need to be refreshed more frequently than that. The Page istelf only deals with one at a time Client based on a QueryStringParameter. My questions are a) how do I cache the DataTable so that a call to the DataBase isn't made each time Repeater item is bound and b) can I create/cache multiple DataTables (one for each Client) and let them live for day, checking for existence before calling the SQL stored procedure to regenerate the data?

My DataTable method: [Code]....

View 2 Replies

Caching - What Techniques Should Be Used To Handle Objects In Asp.net Cache To Prevent Problems From Multiple Worker Threads Access

Sep 8, 2010

since asp.net contains multiple threads that are executing at the same time.so if 2 threads access an object (simple or complex) that i got from the the asp.net httpcontext Cache.can't this lead to state problems on that object if these 2 theads tried to modify/read it at the same time?so what kind of precautions should i implement?for example i am thinking maybe locking the object while working with it? (wont this cause performance problems?)or maybe when i retrieve some object from the cache i should create a copy from it?
or maybe i dont need to worry about this issue at all?

View 2 Replies

IIS Multiple Request From Multiple Users?

Feb 3, 2010

"With ASP.NET I've found that request are processed sequentially, one at a time, at least on a server with one CPU. If one request blocks for some reason, maybe on a long database query, then all users must wait
until it completes, for their request to process."

Is this true? Do multi-core processors effect this? Also if you do ahve more than one CPU will it stop processing sequentially automatically or is the default always sequentially?

View 1 Replies

State Management :: Partial Page Caching (user Control Caching) And Button Events?

Jun 14, 2010

I have a page with a number of user controls, In one of my user controls I have a button event. I turn on output cache for the user control that has the button and vary by control using the ID property of a hidden field control in the user control. whenever I turn on the output cache my button event doesn't fire.

View 2 Replies

WCF / ASMX :: Implement Caching Using System.Web.Caching?

May 15, 2010

how to implement caching in wcf service using System.Web.Caching

View 2 Replies

Architecture :: Distributed Caching / Keeping Cache In Sync Between Multiple Webservers Or Even Better Farm Cache Management To Another Server?

Feb 26, 2010

I've got a web application that runs of a state server. It looks like soon it may need to distributed and there will be two web servers behind a load balancer.

This works great for session state but my next challenge is Cache

My application leverages heavily of cache. I understand ASP.Net 4.0 will be offering more here but nothing much has been said about the how too.

There are two challenges that I face

1). Each webserver will have its own copy of cache whereas it would be more efficient to put this to a third server the same as session state is put to state server.

2). The real challenge is keeping cache in sync if a simple dataset derived from the database is changed my code dumps that cache item and reloads the cache. That's all well on one webserver but webserver number two wont know to drop that particular cache item and reload it. This could cause some unexpected problems in the application.

For scenario number 2 I could attempt to do some smart coding so server number two knows to dump the cache and reload it.

My guess is someone else has already been here before and there's probably a better implementation approach rather than writing extra code.

Does anyone know how I could achieve the goal of keeping Cache in sync between multiple webservers or even better farm Cache management to another server?

View 2 Replies

Webconfig Is Same For Multiple Users Or Different?

Apr 19, 2010

Does Webconfig in asp.net is same for Multiple Users or diffrent?

View 2 Replies

MVC :: Have Multiple Users With Their Own Information?

Dec 14, 2010

I am new to MVC. I am trying to write a simple web app - for learning purposes only, that allows multiple users to log in and enter their top 10 favorite movies. Each user can only see and edit their own list. The can have no knowledge of the other users or their lists.In regular ASP.Net I would do somthing like a session variable to store the user id so I could use it to test against the database and return that users information. I as I understand it that is not the way things are done in MVC. My question is how would I do this in MVC?

View 2 Replies

How To Prevent Multiple Users On A Page

Aug 28, 2010

What whould be the best way to prevent multiple users on a page?

For example if a user is at the page "Home.aspx", no other users should be allowed to go there.

I'm using asp.net on the server and the js-frameword jQuery on the client side.

View 4 Replies

MVC :: Update Multiple Users At A Time?

May 21, 2010

I have to update the users based on input value..

here is my code..

<fieldset>
<legend>StudnetInfo</legend>

here i have two textboxes and two dropdown list boxes.. this is the fiedlset user is going to enter their information..

</fieldset>

on the same page i have couple of other Fieldset with there studentInfo with twotextboxes and two dropdownlistboxes smililarly above Fieldset..this data dynamically generated from database for each users.

so all here my intension is insted of updating each and every Fieldset i made one generic fieldset to update all other Fieldsets information

on the Generic view I have this BeginForm

<% using (Html.BeginForm("Update", "home", FormMethod.Post,
new { @id="studentid"}))
{ %>

my JsonResult is

public JsonResult Update(StudentBE e)
{
try
{
var UStatus = Generic.UpdateStudent(e.student,"","");
return Json(UStatus.ToString());
}
catch (Exception ex)
{
return Json(ex.ToString());
}
finally
{
}
}

using this I can update only one user perfectly but I need to loo update all users based on generic Filedset values?

View 1 Replies

Security :: Asp Login With Multiple Users?

Jun 25, 2010

I have an asp login control that uses the standard aspnet database structure.I am using my own user identification system to identify a user based on login values that are not in the aspnet database and setting the user's aspnet database login to a universal login user and password.this works fine and I am able to test this by having one machine log in as "User 1" and another login as "User 2" but I am wondering if there is a limit to the number of user's that can be assigned to one username and password in the aspnet database for website access?Will the system reach the max number of user's in the aspnet database?

View 2 Replies

SQL Reporting :: Email Alerts To Multiple Users

Jan 21, 2010

I have a table in my databse called MailAlerts in this table following are the fields

AlertDetail (which contain the message detail)

AlertParticipent (Which Contain the email address for the users who should receive this alert as example[URL]

AlertSent (Which is BIT fields and will be set to 1 after the email has been sent)

I send automatic email alerts to the AlertParticipent emails with message content which will be extracted from AlertDetail. I am using SQL2005 and asp.net 3.5 as main development tool.

View 3 Replies

C# - Error When Multiple Users Access Web App At The Same Time?

Oct 5, 2010

I'm using .Net 2008 and Oracle 10g as my database. The problem I'm getting is after deploying the application in IIS, when multiple users access the same page at a time i'm getting the error. Can't get the output.

Note: Both the users accessing the same page, same menu at a time.

How can I resolve this?

View 3 Replies

Asp - Multiple Users Share HttpApplication Instance?

Mar 6, 2011

I've used the table at the top of this article as a reference. I have three questions:

1 - Can multiple users (from different physical locations) ever share an HttpApplication instance? If so, does this happen by default?

2 - Can multiple users (from different physical locations) ever share an HttpApplicationState instance? If so, does this happen by default?

3 - Can multiple users of an ASP.NET application ever share a singleton instance or a static variable value? If so, does this happen by default?

View 2 Replies

Security :: Creating Users In Multiple Application?

May 19, 2010

I have 2 different website/applications with 2 different asp.net membership databases in the same server. Now my client wanted to create a user in one website and add that person automatically in to the other application/website/database too. Right now my applications create users using asp.net membership and added to its respective databases. Is it possible to create a user from different application using asp.net membership?

View 6 Replies

Security :: Multiple Applications Use Same Users & Roles?

Jan 10, 2011

I am using ASP.NET Membership with the default provider. I have a project where there are 3 different applications(seperated by the applicationName). Now I need every user to be able to log in to all the applications, but have a seperate role in each.Is this possible(I dont want to duplicate user details or logins for the same person)?

View 4 Replies

Security :: Creating Users For Multiple Applications?

Jan 27, 2011

i am managing three applications .. i hve separate pages in each of these applications for creating users and roles..

can i create a single page where in i can choose for which applications i want to create users..

i am storing the users of each of thse 3 applications in a same database and i hve separate application name for each application in membership provider

View 1 Replies

VS 2010 - Selecting Multiple Users To Email

Apr 3, 2012

I have set up an email function where a user of my website is able to send an email from the webpage including subject field and email body this allows the user that is logged in to select an email address from a drop down menu, once the email send button is clicked this will send an email to whatever email address in the dropdown menu has been selected. I want to be able to incorporate the option to send to multiple contacts such as a class list. I have set up a grid view that pulls information from the database this shows the contacts name, email address and also has a check box column.

I have set up a select all for the checkbox; I want to set up that if a checkbox is selected then the email will be sent to that person in question, so they could send an email to one, many or all users. Here is the vb code for on the email send button at the moment. I know that it has to do with the myMessage.To.Add(TxtBxEmail.Text). But instead of selecting TxtBxEmail.Text that contains the one email address from the drop down menu. I wish to be able to select any email addresses from the grid view that have been selected. This is in VS 2010 VB.

Code:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Imports System.IO
Imports System.Web.UI.DataVisualization.Charting
Imports System.Net.Mail

[Code] ....

View 2 Replies

Configuration :: Testing Multiple Users On Local Network?

Sep 23, 2010

I have VWD 2010 Express installed. While developing I would like my co-workers to test the application (the parts that are "finished"). When I click "View in browser" for some web form of my application or "Start debugging" the app is shown in my browser at:

http://localhost:3424/Default.aspx

My IP on local network is 192.168.1.14. How can my co-workers access this page?

Note: I do not have IIS instaled (just ASP.NET Development Server).

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved