ADO.NET :: After Domain Changed TransactionScope Acting Wierd?

Feb 18, 2011

I m using transactionscope and there was no problem until my domain changed.When it hits the scope7, it inserts the data and starts all over again and inserts for the second time.

Here is my sample code:

Using scope7 = New TransactionScope(TransactionScopeOption.RequiresNew)
Dim comm As New Data.SqlClient.SqlCommand("INSERT INTO ABC (ID, AID, Type) VALUES (@ID, @AID, @Type)", conn)
comm.Parameters.AddWithValue("@ID", TaskID)
comm.Parameters.AddWithValue("@AID", FormID)
comm.Parameters.AddWithValue("@Type", FormType)
conn.Open()
comm.ExecuteNonQuery()
scope7.Complete()

View 1 Replies


Similar Messages:

C# - ValidateRequest="false" Is Acting Wierd?

Apr 4, 2011

(ASP.NET 4.0 C#)

I have my <httpRuntime requestValidationMode="2.0" /> in the webconfig. AndI have my validateRequest="false" in page directories.On one page, I send some data (html) from a ckeditor (textarea) to a database. Works fine.On another page I fill the ckeditor with data from a database, then I update it (send it back), and I get the famous "A potentially dangerous Request.Form value was detected from the client."

Makes me very confused. The only difference is that on the second page the data gets dynamically inserted into the textarea, where on the first page the textarea is empty on pageload. Am i missing something here? Im pretty sure Encoding/decoding doesnt mean anything, as the framework stops it before I can even start messing with it on the backend.

View 2 Replies

Installation :: Changed DNS Of Domain To New Server But Still Going To Old One?

Mar 10, 2010

Is this normal? Whois and my windows hosting account at godaddy both say the DNS records for my domain are changed to the godaddy ones, but the domain still points to the old server. Do I have to wait longer?

View 1 Replies

C# - Radio Buttons Are Not Acting As A Group

Jan 13, 2011

I am using Radio buttons inside a panel in a web page. (Since group boxes are not there). But when I click on each radio button they all are checked. They are not acting as a group but single units.

View 3 Replies

ExtJs Grid Acting Very Strange

Oct 18, 2010

So I have two pictures of the weirdness that is occuring.As you can see in the picture above, the scroll bar on the right hand side is being cut off a little bit by the screen, and even when you scroll to the right, you don't get the bar back, it remains cut off.

Here is the other scenario:

Here, you can see that when I scroll down in this grid, the scroll bar kind of fits into the bottom of the grid and doesn't even go all the way down. You need to manually click into the grid and hit the down arrow to get the rest of the way down.

Edit: Here is the code to generate the grid (Ext created through VB controls):

Dim VehicleOptionsGrid As New Akcelerant.Framework.WebControls.Grids.Grid
With VehicleOptionsGrid
.ID = "VehicleOptionsGrid"[code].....

View 1 Replies

Forms Data Controls :: Two More GridViews Acting On Each Other

Mar 28, 2011

I have a couple grid views one for Team Goals and one for Indicators for the Goals I want to be able to click on an indicator and it highlight the Goal in the other grid view both on the same page. I also want to be able to click one of the indicators and open a entry screen I assume for that I use the select portion of the control?

View 2 Replies

Master Page Acting Wired On Different Pages

Aug 26, 2010

I applied this master page to two files..one inside the same folder(file1.aspx) as the master page..another outside(file2.aspx)..master page is applying alright to file2.aspx BUT not completely..a TD's bgcolor is missing..and ONLY that..why so TH files got no code of their own yet..just the application of the master pag

View 1 Replies

C# - LINQ2Entity Framework Query Acting Strange?

Feb 20, 2011

I have strange problem with my query. I have two almost identical situations in which one query is acting as it should be while the other gives errors.

var osobaIme = (from o in db.osobas
orderby o.osoba_ime
select o.osoba_ime).ToList().Distinct();

[code]...

View 2 Replies

C# - Jquery Click Tracking Is Acting A Little Strage?

Apr 21, 2010

On some links on my HTML page I have a special CSS class, that when clicked, I make a ajax call to a click.aspx page and track the click.

<a href="..." class="click" id="blah-1">blah-1</a>


$(".click").bind("click", function() {[code]....

So what is happening is the value of source, after clicking a few links (that open in a new window) becomes:

source=blah1
then it becomes
source=blah1,blah2

View 1 Replies

ADO.NET :: Using TransactionScope In BLL With TableAdapters As DAL?

Dec 26, 2010

I have two BLL classes ItemsBLL & BalanceBLL. When ever a new Items gets Added to Items table few details needs to be added to Balance Table.

I am using the following code to perform the operation, is this code efficient or something needs to be changed.

The function that needs to be checked is the Insert function in ItemsBLL Class.

[Code]....

Is this function effective?

[Code]....

[Code]....

View 11 Replies

ADO.NET :: LINQ And TransactionScope?

Mar 4, 2011

I have a requirement whereby I either have to perform and update or an insert on 1 table inside a transactionscope

There are 3 table in total, 2 will always be an insert, but 1 could be either an update or insert depending if some data already exists a foreign key relationship exists between all 3 tables (not on the same column though)

heres my code

[Code]....

[Code]....

View 2 Replies

TransactionScope In A Medium Trust

Feb 3, 2010

Im running an ASP.NET MVC application hosted with Mosso, there are telling me that they cannot enable DTC because they run everything in medium trust.So when executing code that references: TransactionScope I get the following error. The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)

Is there anyway to get around this?

View 1 Replies

ADO.NET :: TransactionScope And Explicit Transaction In It

Feb 23, 2011

[Code]....

Now,

1. If In transaction scope if 1st Transaction is commited, buting 2nd one exception occurs and it is rolled back

2. Any other exception occurs, after 1st transaction is completed/commited

Here, explicit transactions are used. In both cases does all transactions in the scope are revert back? What are the possiblities here?

View 7 Replies

.net - Session-in-view And TransactionScope?

Dec 21, 2010

we have a asp.net webforms app using NHibernate. Here are some specifics:We need Distributed Transactions because we write to the database as well as to a queue.Because this is a web app, we use the recomended Session-in-view pattern. We have a HTTPModule that opens the NHibernate session on the BeginRequest event and closes it on EndRequest.Within the flow of a request, we have several separate moments where we need to do transactional work. For this, we use TransactionScope.So basically, what happens is this (pseudocode):

using(var session = sessionFactory.CreateSession()){
using(var tx1 = new TransactionScope(){
//work work work

[code]...

View 2 Replies

ADO.NET :: How To Insert Data In Both Tables Using TransactionScope

Sep 4, 2010

I am working on Sales application. In database i have SalesOrderHeader & SalesOrderDetail tables. They are almost typical Adventureworks db tables.

How to insert data in both tables using TransactionScope so if any of the record from the two tables generate error complete transaction roll-back.

One thing more I am using TableAdapters, My initial concept was inserting record in SalesOrderHeader, get SalesOrderId using Scope_Identity & bulkInsert Records to SalesOrderDetail using TransactionScope.

View 1 Replies

Installation :: Not Changed The Webconfig, Only Changed Pages' Content/code Behind?

Jan 13, 2010

After some code change I have published my AJAXised web application to the server and the application failes to work properly - something weird is going on, as all .aspx pages are displayed as an ASPX markup text (page declaration, html controls, etc.), rather than a page is being rendered as an html. I have not changed the webconfig, only changed my pages' content/code behind.

View 4 Replies

Architecture :: Sending Mail With Smtp Within TransactionScope?

Apr 29, 2010

I have code that is supposed to do some database operations and then send an email through local iis smtp virtual server. All within one TransactionScope. It looks like

[Code]....

The second one where I use something similiar is

[Code]....

I want to notice that these events fire in the sequence they are shown. Now when there's an error, the db operations are rolled back, but the mail is sent anyway. I'm using Windows XP SP3, IIS 5.1, .Net 3.5, Visual Studio 2008. If I'm correct, TransactionScope uses MSDTC, right? I couldn't find anything about MSDTC working with smtp. Should it even work?

[code]....

View 2 Replies

Can TransactionScope Rollback A Transaction After The Connection Is Closed

Jul 24, 2010

Suppose say I am doing a couple of operations.

First a delete and then an insert.

Now, these two operations are done with two different connections (say con1 and con2). Both these connections are enlisted in the same TransactionScope.

Before the delete/insert operations the connections are opened and immediately closed.

So, now if the insert fails, then how is the delete rollbacked since con1 has been closed?

View 1 Replies

Will Transactionscope Work Over Multiple Calls To Different Services

Jun 18, 2010

I'm writing some merge functionality in C# asp.NET MVC2. I am also using using Linq2SQL.

I have a block of code which calls two services, MessageService and UserService. These both in term call their appropriate repositories and make the amendments to the db. Each repository declares it's own instance of the repository so I'm thinking this will escalate the following code to DTC . The code is called from the AccountService, is this going to work at this level? And also is it bad practise to declare the DataContext at the top of every repository or should I pass the object around somehow?
//Run the merge
try
{
using (TransactionScope scope = new TransactionScope()) [code]....

View 2 Replies

SQL Server :: Row Not Found Or Changed - Only When Field Is Changed To Something Else Then 0

Sep 14, 2010

For our ASP.NET project for school we had to build a sport event management web application.

We provide the application in three languages (English, Dutch & French) which you can switch all the time. This has worked all the time for all users, well that's what we think anyway.

Yesterday I found out that switching from one to another language isn't working for 2 of our users. So I started testing a bit and I always got this error.

I'll try to explain what happens behind the doors when changing the language:

First of all the current language is saved in a session so we don't have to check the user row every time a page loads. Besides that we save the language in the users row in the database.

Users Table:

Id int
Unchecked
Email varchar(150)
Unchecked

View 2 Replies

DataSource Controls :: How To Wrap The DataContext's SubmitChanges Within A TransactionScope When Modifying Multiple Tables

Feb 20, 2010

I am confused about why I would need to wrap the DataContext's SubmitChanges within a transactionScope when modifying multiple tables. I was under the impression that the DataContext would track these changes and would therefore create its own transaction if need be.

In other words, if a change was made to update table A, B and C or if I made changes to 10 out of 20 items in a collection of rows, that the datacontext would track these changes and create its own transaction. If that is correct then why have I seen examples that wrapped these types of updates in a TransactionScope?

View 4 Replies

State Management :: How To Keep Current User Session When Redirected To Sub Domain From Main Domain

Feb 17, 2011

I have also installed SSL on a subdomain. I have put payment page under this sub domain.

View 4 Replies

Windows Authentication - Run Application Under Domain Account Without Joining The Domain?

Sep 28, 2010

My feeling says it's not posible but anyway I am curious if there is at least a workaround for accomplish this.Basically I am working at my client site and my machine is not connected to the domain.What I want to do is running a web application locally under a domain account, and using the webdev server.The webapp uses the default authentication, windows authentication that is.I tried using impersonation with domainuser & password but I got the following error Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Logon failure: unknown user name or bad password.I have to mention that the username and the password are correct.

View 1 Replies

The Trust Relationship Between The Primary Domain And The Trusted Domain Failed

Aug 3, 2010

We have a ASP.NET site that partially depends on forms authentication for login credentials, however the implementation of IPrincipal is completely custom.

But, when running the site on a particular server (which is somewhat semi-hardened when it comes to security), the app crashes when invoking IPrincipal.IsInRole() with the following messsage:

System.SystemException: The trust relationship between the primary domain and the trusted domain failed.

This indicates a communication error between the web-server and the DC, however since our application doesn't at all utilizes Windows authentication, I don't see why it needs to communicate with the DC.

This is my implementation:

[code]...

EDIT:

I was finally enable to reproduce this error on my dev-machine (i revoked my machine from the DC yesterday, but didn't reproduce it until today)

HttpContext.User is actually a WindowsPrincipal by default it seems, and the error in my code was that I only replace it with CustomPrincipal upon login. Hence, unathenticated users still get the WindowsPrincipal which then fails horribly if you have trust issues on your AD.

I tried changing the default principal by invoking this on appstart

AppDomain.CurrentDomain.SetPrincipalPolicy( PrincipalPolicy.NoPrincipal);

But this doesn't seem to kick in. How do I change the default Principal in ASP.NET?

View 1 Replies

C# - Sharepoint Retrieving Username Without Domain Or Programmatically Removing Domain

Aug 16, 2010

Im returning the username from sharepoint site as a string. This is done successfully with the below code but I also get the domain with it. How can I only return the username and not the domain either through sharepoint or programmatically removing it? domain/username

[Code]....

View 3 Replies







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