MSDTC Distributed Transaction Coordinator Enabling?

Feb 24, 2011

I've a web server and a separate SQL server. I'm trying to use transaction scope to ensure that SQL queries are completed with my linq queries.

I wrap everything with this

using (TransactionScope scope = new TransactionScope())

I want to know where I need to install DTC. Do I need to install it on the IIS 7.5 box AND the SQL server? Do I need to unblock some ports? Are there any security risk in doing so?

I've setup this up once before but don't remember how. If I can't get access to DTC then is there any other way to ensure a lINQ and sql query is atomic?

View 1 Replies


Similar Messages:

VS 2008 Avoiding MSDTC / Finding Tutorials For Options

Oct 31, 2010

Various tutorials and articles describing the N-tier architecture use the "Open Late Close Early" methodology for Connection objects. The connection is just opened before a "ExecuteNonQuery or ExecuteReader" command, and closed immediately

This means that inside a transaction where a number of business objects have to be updated (using different DAL classes), the connection can be opened and closed many times.

In that case the transaction will be escalated to a distributed transaction. Now we can’t assume that MSDTC will be availableunning every where. Now if I am building a website to be uploaded using those shared web hosting services, which does not allow MSDTC , what are my options ?

View 10 Replies

Flush Separate Castle ActiveRecord Transaction And Refresh Object In Another Transaction

Jun 15, 2010

I've got all of my ASP.NET requests wrapped in a Session and a Transaction that gets commited only at the very end of the request. At some point during execution of the request, I would like to insert an object and make it visible to other potential threads - i.e. split the insertion into a new transaction, commit that transaction, and move on. The reason is that the request in question hits an API that then chain hits another one of my pages (near-synchronously) to let me know that it processed, and thus double submits a transaction record, because the original request had not yet finished, and thus not committed the transaction record.

So I've tried wrapping the insertion code with a new SessionScope, TransactionScope(TransactionMode.New), combination of both, flushing everything manually, etc. However, when I call Refresh on the object I'm still getting the old object state. Here's some code sample for what I'm seeing:

Post outsidePost = Post.Find(id); // status of this post is Status.Old
using (TransactionScope transaction = new TransactionScope(TransactionMode.New))
{
Post p = Post.Find(id);
p.Status = Status.New; // new status set here
p.Update();
SessionScope.Current.Flush();
transaction.Flush();
transaction.VoteCommit();
}
outsidePost.Refresh();
// refresh doesn't get the new status, status is still Status.Old

View 1 Replies

Caching Over Distributed Application On Servers?

Aug 22, 2010

I have a web application that will be distributed over 2 servers and the Database will be on a server other than the 2 servers. so application on each server will access database exists in another server.I am using caching in the application and when data changed the cache is cleared and the problem now how each server will feel with cache changes on the other server?

I have tried SQLCache dependency before and i have heard about Memcached, Velocity and Enterprise cache so which one will be more efficient and optimal for this case? and i have another solution to create webservice method on each application and when the cache is cleared in one application it will request the webservice method on the other application to clear cache there.

Which technique is more efficient and optimal in performance and security? and is SQLCache dependency related to SQL database only or can be applicable to other databases like Oracle?

Note: I am using load balancer to distribute requests coming for the application among the 2 server

View 1 Replies

C# - Distributed Critical Section In Web-farm?

Mar 18, 2011

I have about 50 web-sites, load-balanced across 5 web-servers. They all use Enterprise Library Caching, and access the same Caching database. The items in the Caching database are refreshed every few hours, using an ICacheItemRefreshAction implementation.I want to guarantee that only one web-site ever refreshes the cache, by putting the refresh code in a critical section. If the web-sites were running in a single app-pool on a single server, I could use a lock()If the web-sites were running in separate app-pools on a single server, I could use a Mutex.However, these will not ensure the critical section across multiple web-servers.Currently, I am creating a new key in the caching database to act as a mutex. This will generally work, but I can see a slim chance that 2 processes could enter the critical section.

public class TakeLongTimeToRefresh : ICacheItemRefreshAction
{
#region ICacheItemRefreshAction Members

[code]...

View 2 Replies

C# - Querying Multiple Databases Using Distributed Web Services?

Feb 5, 2011

I have a quick question about best practices and especially expected performance for the following scenario:

If I want to query data from multiple servers that contain schematically identital sql databases, would having each server provide a web method that a single client application can consume be an appropriate (and relatively fast) solution?

The data just needs to be consolidated on the client end, where several web methods would have to be consumed serially (or in parallel?) to provide the data to the client. Each server would also be implementing Entity Framework as an ORM.

Performance is my main concern here, would it turn out excessively slow as we start to scale up to more and more servers?

View 2 Replies

Crystal Reports :: Unable To Find Data File When Distributed?

May 14, 2010

I have a problem that i'm sure will not be hard to fix for anyone who has been using CR for some time.

To start I have created a program in VB2008, that uses a MS Access data file, I can connect to it with no problem and can also add data and amend data, so all seems to work perfectly. I have published it and it once again runs perfectly on another/s machines.

I have now a requirement for a number of reports so have choosen CR for this purpose. I have connected the report to the database and that runs with no problems at all, that is untill I try to run it on another machine, it seems not to be able to find the database and comes up with a panel wanting me to log in with a password and Admin name.

I feel it's proberly a problem with the path of the database, I have tried so many time with diferent data files but with no success.

View 6 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

SQL Server :: Query From MDB Files Error "cannot Be Used For Distributed Queries Because The Provider Is Configured To Run In Single-threaded Apartment Mode"

Mar 8, 2011

I would like to make a "select" from an Access (mdb) file in SQL Server 2008 R2. I was using:

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','C:..FILE.mdb', 'SELECT * FROM Users')

But I´m getting the error: Msg 7308, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.ACE.OLEDB.12.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.

View 3 Replies

Disabling One Control And Enabling The Other

Mar 8, 2010

I have a dropdownlist inside a DETAILSVIEW....now when i select one particular option. a textbox should open up and enable me to enter a value in it and when i click insert button of the detailsview..the value i entered in the textbox shud enter the database and not the value i selected in the dropdownlist...how do i go about it....also how do i access the ID of the control inside the detailsview.

View 2 Replies

Enabling Windows Authentication In .NET 4 MVC 2?

Jul 7, 2010

I have an Intranet site reading the windows user name and using it for authentication in the website.

My code works locally but does not read the login name when hosted using IIS 6 on Windows Server 2003 with anonymous access checked. If I un-check anonymous access then in Firefox I keep getting a pop up for username and password which never ends. In IIS 6 it is set to framework 4 and has its own application pool.

User.Identity.Name -returns blank on the server but works fine locally

web.config:
<authentication mode="Windows"/>
<identity impersonate="true"/>

I have an older 3.5 webforms site that works fine on the same server..

View 1 Replies

Options For Enabling Parallel Processing

Mar 11, 2011

It seems that by default, ASP.NET 3.5 running on IIS 6.0 does not do any parallel processing whatsoever. With a quad-core system and a test webforms application that runs an infinite while loop on the server, CPU usage never goes higher than 30% regardless of how many clients are connected and independently running the while loop.What are my options for enabling parallel processing?

View 2 Replies

Enabling / Disabling File Sharing?

Jul 7, 2010

how to disable/enable file sharing as well as the script for the enabling/disabling Printer sharing.

View 1 Replies

Enabling CLR On SQL SERVER 2005 Is Safe?

Mar 30, 2011

I am toying with the idea of enabling CLR on my SQL server, using EXEC sp_configure 'clr enabled', 1

However, I am sharing my database server with several other developers and their projects. I've heard vaguely that their might be security issues with enabling this.

Does anyone know what these issues might be? Is CLR safe to use on SQL Server?

View 1 Replies

JQuery :: Enabling Button If Div Is Visible?

Jan 26, 2011

The general idea is that a LinkButton called InsertButton is disabled by default when the page renders and a div called divMainForm is styled with display: none. If a different button is clicked, a jQuer function is called that toggles the visibility of divMainForm. At that time, the InsertButton should also be enabled. I've tried several variations of this function:

[Code]....

The divMainForm toggles with no problem. I can't seem to find the right combination to a) determine if divMainForm is visible or not and b) enable the InsertButton. I've tried the above and also

.css("display") == "block"
.is(':visible')

No errors but none of them seem to detect the status of the div correctly or enable the button.

View 2 Replies

Web Forms :: Enabling A Button Via TextChanged?

May 12, 2010

once again (as a novice to Visual Studio/C#/ASP, coming from a Delphi background) I am struggling to find an answer to what I imagine must be a simple problem?

I have a webpage with only 2 controls, Textbox1 and Button1. On the Page_Load , I have a line of code which says:

[Code]....

All I want to do is to be able to enable/disable the button depending upon whether or not Textbox1 contains anything. As a newcomer, I thought the answer was simple:

[Code]....

but I should really have known by now that there is NO such things as "simple" when it comes to Visual Studio / C# / ASP for someone transferring from Delphi after 8 years!!

From googling, I can see that if I set the value of AutoPostBack for TextBox1 to true then the button will be en/disabled when control leaves the TextBox. But surely there must be a way to do this while control remains with the TextBox?

View 13 Replies

Security :: Enabling DoD CAC Authentication In IIS On Dev Laptop?

Jun 11, 2010

I was wondering if any of you had the steps that would enable DoD CAC authentication in IIS 5.1 (XP Pro). I have never done this and am looking to set up a dev environment on my laptop for a CAC enabled website. What is the mechanism that would actually prompt me for a cert if I accessed a website on my laptop? I have read that selecting accept or require client certificates should do this but it doesn't. I just get a 403.7 error saying client certificate required.

View 1 Replies

MVC :: Enabling .NET MVC2 Unit Tests In VWD?

Mar 16, 2010

As stated in http://forums.asp.net/t/1535916.aspx the unit tests are missing from the ASP.NET MVC 2 RTM source code, but are available on CodePlex at

http://aspnet.codeplex.com/releases/view/41742).

After installing ASP.NET MVC2 RTM on Visual Web Developer 2008 Express, apparently unit tests are not enabled for VWD - when I create a new MVC2 project I don't get the "Create Unit Test Project" dialog box where I can say"Yes, create a unit test project".(I thought I was presented with that dialog box in earlier versions of either MVC2 RC or MVC1, but maybe not...)

Given the source code on codeplex, is it possible to use that to enable unit tests for MVC2 for VWD Express? If so, are the steps one have to take detailed somewhere?

View 5 Replies

Installation :: Enabling 4.0 Framework Using REGIIS?

Jul 26, 2010

I found instructions on here last week that listed the specific directory from which to run REGIIS via a command prompt, but can't find the thread.

View 1 Replies

AJAX :: Enabling Javascript Debugging?

Apr 2, 2010

I'm trying to debug some problems I have with Javascript code in the Ajax Control Toolkit. I tried setting debug=true in Web.config and adding ScriptMode=Debug in the script manager; but when the error occurs I still get the compressed JS files. Is there any way to get the uncompressed JS files to the browser? Does anyone have a simple self contained example of this working?

View 4 Replies

Web Forms :: Enabling Enter Key With ReCaptcha?

Jan 3, 2010

I have deployed reCaptcha using ASP.NET. [URL]

Users are complaining they need to click the submit button. They want the option to use the Enter Key on the keyboard as well. How do I enable the Enter Key?

Below is my working code.

<asp:Content ID="Content1" ContentPlaceHolderID="ContentSpeeD" Runat="Server">
<p>Prove yourself Human by passing the Captcha Test.<br>
Please type the two words below.<br>
The purpose of this test is to help prevent our site being spammed.</p>
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
PublicKey="pubkey"
PrivateKey="privkey"
/>
<br />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
<br/>
<asp:Label Visible=false ID="lblResult" runat="server" />
</asp:Content>

View 2 Replies

C# - DataGrid.Items While Enabling The Paging?

Oct 4, 2010

I'm using a Datagrid with paginig, while clicking on select all , all items in all pages are selected but while the execution, I'ven't all the selected items.
How can you get the DataGrid.Items.Count to reflect the FULL record count instead of displaying the page size?

I'm using this property and all it's displaying is the page size of 10.

View 2 Replies

MVC - Enabling Caching Of The Compressed Page Output?

Sep 30, 2010

I've seen a number of options for adding GZIP/DEFLATE compression to ASP.Net MVC output, but they all seem to apply the compression on-the-fly.. thus do not take advange of caching the compressed content.

Any solutions for enabling caching of the compressed page output? Preferably in the code, so that the MVC code can check if the page has changed, and ship out the precompressed cached content if not.

This question really could apply to regular asp.net as well.

View 3 Replies

AJAX :: Enabling Or Disabling Modal Pop-up On Submit?

Sep 8, 2010

I have a page where the user edits information and i want to run a series of checks on the data and then warn the user with options 'Yes' or 'No' and run code accodingly on their choices.

How would i go about doing this?

I am writing if value_changes then modalpop.Show but this does not work if there is other code within the button submit.

View 2 Replies

Ajax Code For Enabling And Disabling Dropdown Box?

Feb 22, 2010

How to write an ajax function to disable a dropdown, until its parent dropdown is selected?

View 1 Replies







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