Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Saturday, March 31, 2012

There is no position at row 0

Hi:

I am getting this error when a transaction needs to write to the Database after the user clicks the submit button.

Any help on what is the cause is greatly appreciated.

Thanks in advance for your help.It's impossible to answer this without seeing some code and also the eventual stored procedure you are using to execute the transaction.
************* Edited by moderator Adec ***************
Inserted missing < code></ code> tags. Always include such
tags when including code in your postings. Many readers
disregard postings without the code tags.
**************************************************

Thanks. Here is the situation. I am updating a site which was given to me, and fairly new to .net. I am competent to decifer the situation with the help by a person who knows.
Now correct me if I am wrong. I see that it is going to write the transaction to a table called 'Transactions'. I'm looking at the table in the DB and the fields do not look like the fields it is looking for below. Now I am assuming that I should change the fields in this code to match exactly what is in the table. Also the fields in the table do not have the letters in front of the field name. Ex: iUserID, dtDateTime. It has UserID, DateTime.. etc. what are the letters in front for? Also the last line of this code, should there be a table called PublicPayInvoice created in the DB, because I don't see it. Not sure if that is the table it is looking for.

Thanks

The Code:


'Write the Transaction
If sX_Response_Code = "1" Then
Transactions.WriteTransaction(iUSerID, dtDateTime, iAccountID, sTransactionType, sMethod, sRecipientEmail, _
sx_Email, "YES", "NO", sX_Response_Code, sX_Response_Subcode, _
sX_Response_Reason_Code, sX_Response_Reason_Text, _
sX_Auth_Code, sX_AVS_Code, sX_Trans_ID, sX_Description, dProcessing, _
dTransactionFee, dChargeBackFee, dRefundFee, dPremiereFee, dRequestedAmount, _
dX_Amount, sIP, "PP")
Else
If sX_Auth_Code = "" Then
sX_Auth_Code = "0"
End If

Transactions.WriteTransaction(iUSerID, dtDateTime, iAccountID, sTransactionType, sMethod, sRecipientEmail, _
sx_Email, "NO", "YES", sX_Response_Code, sX_Response_Subcode, _
sX_Response_Reason_Code, sX_Response_Reason_Text, _
sX_Auth_Code, sX_AVS_Code, sX_Trans_ID, sX_Description, dProcessing, _
dTransactionFee, dChargeBackFee, dRefundFee, dPremiereFee, dRequestedAmount, _
dX_Amount, sIP, "PP")
End If
'Get the TransactionID
iTransactionID = Transactions.GetPublicTransactionID(iUSerID, sRecipientEmail, sx_Email)

Dim sTo As String
Dim sFrom As String
Dim sSubject As String
Dim sBody As String
Dim mail As New MailMessage()
Dim iTemp As Integer

If sX_Response_Code = 1 Then
Transactions.PublicPayInvoice(iUSerID, sCustomerInvoivceNum, iTransactionID, sTransactionType, sMethod, _
Left(Session.Contents.Item("x_Card_Num"), 4) & "-XXXX-XXXX-" _
& Right(Session.Contents.Item("x_Card_Num"), 4), sExpDate, _
Session.Contents.Item("x_Card_Code"), Session.Contents.Item(" _
"x_bank_Name"), Left(Session.Contents.Item("x_Bank_Acct_Num"), 2) _
& "XXXXXXXXXXXXXX" & Right(Session.Contents.Item("x_Bank_Acct_Num"), 4), _
Session.Contents.Item("x_Bank_ABA_Code"), sFirstName & " " & sLastName, _
sAddress, sCity, sState, sZip, sCountry, sCardType)


You are using an own Class called Transactions here. What do the methods from that Class used here look like?
The class is to long to post here for you to look at. Can I email it to you?
Firstly, sharpening up your communication skills would be a great help. How do you expect us to know what is going on if you don't give us the appropriate information? For example, what is the error that you talked about in your first post!?!

Secondly, the additional "letters in front of the field name" are simply a naming convention and relate to the ID of the Controls/Varaibles that you are using.

Thirdly (to reiterate Andre's point), Transaction is actually an Object (an instantiated Class) and isn't a table in the database.

Finally, PublicPayInvoice is a method of the Invoice Object, not another table.

> I am competent to decifer the situation with the help by a person who knows
Evidently not!!
WoW. Thanks for being so CRUEL!
I was just thinking the same about2flip thing after reading the post from stevenbey.

Its amazing why some tech's get a bad wrap for having god-like complex's, lol. Dealing with people (or answering forums) this guy should not!!!
>>Dealing with people (or answering forums) this guy should not!!!

There are many who would disagree (i.e. those people who's problems I have solved).

There MUST be a better way!

When we want to confirm a user action before a post back occurs, we've been
writing code like this:

function onClickDelete()
{
var aResponse = window.confirm("Delete this record?");
if ( aResponse )
__doPostBack('theLayout$_ctl1$buttonDelete','') ;
return 0;
}

This seems like an "un-natural" act - is there a better way?

-- dwathe OOP approach would be to subclass the button, and add a confim property,
that can be set in the designer, or in the code behind. the new control
would then handle rendering the required javascript.

-- bruce (sqlwork.com)

"dwa" <da@.hotmail.com> wrote in message
news:O$CrRbe5DHA.2696@.TK2MSFTNGP09.phx.gbl...
> When we want to confirm a user action before a post back occurs, we've
been
> writing code like this:
> function onClickDelete()
> {
> var aResponse = window.confirm("Delete this record?");
> if ( aResponse )
> __doPostBack('theLayout$_ctl1$buttonDelete','') ;
> return 0;
> }
> This seems like an "un-natural" act - is there a better way?
> -- dwa
"bruce barker" <nospam_brubar@.safeco.com> wrote in message
news:%23bSpRse5DHA.1428@.TK2MSFTNGP12.phx.gbl...
> the OOP approach would be to subclass the button, and add a confim
property,
> that can be set in the designer, or in the code behind. the new control
> would then handle rendering the required javascript.

Yes. OOP as in: "Oooooops! This took a lot longer to complete than it
should have (2 hours as opposed to 2 minutes), and now we've got another
component to unit test..."

<ggg
There ought to be a 5 *second* approach to solve such a problem. It's
throw-away.

-- dwa
You can do this from code to the button, i'm not quite sure yet how you can
set onClick attributes to a web control from the designer.

Button1.Attributes.Add("onClick", "javascript:return confirm('are you
sure');")

"dwa" <da@.hotmail.com> wrote in message
news:O$CrRbe5DHA.2696@.TK2MSFTNGP09.phx.gbl...
> When we want to confirm a user action before a post back occurs, we've
been
> writing code like this:
> function onClickDelete()
> {
> var aResponse = window.confirm("Delete this record?");
> if ( aResponse )
> __doPostBack('theLayout$_ctl1$buttonDelete','') ;
> return 0;
> }
> This seems like an "un-natural" act - is there a better way?
> -- dwa
If the button is called btn1, add the following code to the Page_load: (in
vb)

Dim btn as button = btn1

btn.Attributes.Add("onClick")="javascript: return etc. ..."

The code in the onclick event of the button will only fire when the
javascript returns TRUE.

"Michael Ramey" <raterus@.localhost> schreef in bericht
news:Ov7pjye5DHA.2416@.TK2MSFTNGP10.phx.gbl...
> You can do this from code to the button, i'm not quite sure yet how you
can
> set onClick attributes to a web control from the designer.
> Button1.Attributes.Add("onClick", "javascript:return confirm('are you
> sure');")
> "dwa" <da@.hotmail.com> wrote in message
> news:O$CrRbe5DHA.2696@.TK2MSFTNGP09.phx.gbl...
> > When we want to confirm a user action before a post back occurs, we've
> been
> > writing code like this:
> > function onClickDelete()
> > {
> > var aResponse = window.confirm("Delete this record?");
> > if ( aResponse )
> > __doPostBack('theLayout$_ctl1$buttonDelete','') ;
> > return 0;
> > }
> > This seems like an "un-natural" act - is there a better way?
> > -- dwa
Problem with doing this sort of client side rerouting is that.. sometimes
the client has script accessed turned off, using a low level browser, etc.
etc. all sorts of problems. Therefore I decided to just make a simple server
sideded dialog box... STILL an ugly hack though. =P

"Martin" <anolis@.mail2world.com> wrote in message
news:40183939$0$89909$1b2cd167@.news.wanadoo.nl...
> If the button is called btn1, add the following code to the Page_load: (in
> vb)
> Dim btn as button = btn1
> btn.Attributes.Add("onClick")="javascript: return etc. ..."
> The code in the onclick event of the button will only fire when the
> javascript returns TRUE.
>
> "Michael Ramey" <raterus@.localhost> schreef in bericht
> news:Ov7pjye5DHA.2416@.TK2MSFTNGP10.phx.gbl...
> > You can do this from code to the button, i'm not quite sure yet how you
> can
> > set onClick attributes to a web control from the designer.
> > Button1.Attributes.Add("onClick", "javascript:return confirm('are you
> > sure');")
> > "dwa" <da@.hotmail.com> wrote in message
> > news:O$CrRbe5DHA.2696@.TK2MSFTNGP09.phx.gbl...
> > > When we want to confirm a user action before a post back occurs,
we've
> > been
> > > writing code like this:
> > > > function onClickDelete()
> > > {
> > > var aResponse = window.confirm("Delete this record?");
> > > if ( aResponse )
> > > __doPostBack('theLayout$_ctl1$buttonDelete','') ;
> > > return 0;
> > > }
> > > > This seems like an "un-natural" act - is there a better way?
> > > > -- dwa
> > >

Wednesday, March 28, 2012

Third-Part Cookies blocked by IE

Hi guys,

we are developing a webapplication which let user create their own
virtual website on their real domain.
in other word, users could create their virtual web-sites by this
application and app will recognize each website
by its domain.

we needed a passport system (like .Net Passport) to identify users in
all of these virtual web-sites (& various domains)
we build this system upon third-party cookies by making request from
each site to passportserver using import script tags.

now the problem is : IE 6.0, 7.0 won't let the web-applciation to
create thirdparty cookies by default and users have to add passport
server domain to TrustedZone,i heared that p3p could solve this
problem but id don't know how !? should we register our domains in
some database ? is it free ?

Thanks in advanceHi,

We only have this problem with IIS 6.0.

We configure the p3p.xml and the p3pconfig.xml correctly in the root
domain of our server.
We configured the P3P in the application begin request in
global.asax :
Context.Response.AddHeader("P3P", @."CP=""CAO PSA OUR""");

But the problem persist we have no solution, please tell me if you
find one.

Thanks,
Johnny

On 2 fv, 19:52, "Khafancoder" <khafanco...@.gmail.comwrote:

Quote:

Originally Posted by

Hi guys,
>
we are developing a webapplication which let user create their own
virtual website on their real domain.
in other word, users could create their virtual web-sites by this
application and app will recognize each website
by its domain.
>
we needed a passport system (like .Net Passport) to identify users in
all of these virtual web-sites (& various domains)
we build this system upon third-party cookies by making request from
each site to passportserver using import script tags.
>
now the problem is : IE 6.0, 7.0 won't let the web-applciation to
create thirdparty cookies by default and users have to add passport
server domain to TrustedZone,i heared that p3p could solve this
problem but id don't know how !? should we register our domains in
some database ? is it free ?
>
Thanks in advance


Hi Everybody,

The HTTP HEADERS were remove by IIS 6.0.

To solve the problem go to :
1) Properties on the web root
2) Click HTTP HEADERS tab
3) Custom Headers panel
4) Click Add...
Key : P3P
Value : CP="CAO PSA OUR"

Hope that will help some one.
Johnny

On 26 mar, 16:45, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:

Quote:

Originally Posted by

Hi,
>
We only have this problem with IIS 6.0.
>
We configure the p3p.xml and the p3pconfig.xml correctly in the root
domain of our server.
We configured the P3P in the application begin request in
global.asax :
Context.Response.AddHeader("P3P", @."CP=""CAO PSA OUR""");
>
But the problem persist we have no solution, please tell me if you
find one.
>
Thanks,
Johnny
>
On 2 fv, 19:52, "Khafancoder" <khafanco...@.gmail.comwrote:
>
>
>

Quote:

Originally Posted by

Hi guys,


>

Quote:

Originally Posted by

we are developing a webapplication which let user create their own
virtual website on their real domain.
in other word, users could create their virtual web-sites by this
application and app will recognize each website
by its domain.


>

Quote:

Originally Posted by

we needed a passport system (like .Net Passport) to identify users in
all of these virtual web-sites (& various domains)
we build this system upon third-party cookies by making request from
each site to passportserver using import script tags.


>

Quote:

Originally Posted by

now the problem is : IE 6.0, 7.0 won't let the web-applciation to
create thirdparty cookies by default and users have to add passport
server domain to TrustedZone,i heared that p3p could solve this
problem but id don't know how !? should we register our domains in
some database ? is it free ?


>

Quote:

Originally Posted by

Thanks in advance- Masquer le texte des messages prcdents -


>
- Afficher le texte des messages prcdents -


Better, just look at this url : http://support.microsoft.com/kb/324013/en-us
On 27 mar, 15:38, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:

Quote:

Originally Posted by

Hi Everybody,
>
The HTTP HEADERS were remove by IIS 6.0.
>
To solve the problem go to :
1) Properties on the web root
2) Click HTTP HEADERS tab
3) Custom Headers panel
4) Click Add...
Key : P3P
Value : CP="CAO PSA OUR"
>
Hope that will help some one.
Johnny
>
On 26 mar, 16:45, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:
>
>
>

Quote:

Originally Posted by

Hi,


>

Quote:

Originally Posted by

We only have this problem with IIS 6.0.


>

Quote:

Originally Posted by

We configure the p3p.xml and the p3pconfig.xml correctly in the root
domain of our server.
We configured the P3P in the application begin request in
global.asax :
Context.Response.AddHeader("P3P", @."CP=""CAO PSA OUR""");


>

Quote:

Originally Posted by

But the problem persist we have no solution, please tell me if you
find one.


>

Quote:

Originally Posted by

Thanks,
Johnny


>

Quote:

Originally Posted by

On 2 fv, 19:52, "Khafancoder" <khafanco...@.gmail.comwrote:


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Hi guys,


>

Quote:

Originally Posted by

Quote:

Originally Posted by

we are developing a webapplication which let user create their own
virtual website on their real domain.
in other word, users could create their virtual web-sites by this
application and app will recognize each website
by its domain.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

we needed a passport system (like .Net Passport) to identify users in
all of these virtual web-sites (& various domains)
we build this system upon third-party cookies by making request from
each site to passportserver using import script tags.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

now the problem is : IE 6.0, 7.0 won't let the web-applciation to
create thirdparty cookies by default and users have to add passport
server domain to TrustedZone,i heared that p3p could solve this
problem but id don't know how !? should we register our domains in
some database ? is it free ?


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Thanks in advance- Masquer le texte des messages prcdents -


>

Quote:

Originally Posted by

- Afficher le texte des messages prcdents -- Masquer le texte desmessages prcdents -


>
- Afficher le texte des messages prcdents -


Well, I am doing it same way you did on my site
Response.AddHeader("P3P", @."CP=\"CAO PSA OUR\"");

And nothing gets removed by IIS. I have IIS 6.0 on Win2003

I was a bit confused when you said it's not working but had no idea why. You
can download tool called fiddler (www.fiddlertool.com/ )
This is Microsoft tool to spy on browser requests and watch what is actually
your server sends to browser (or vise versa)

George

"JohnnyKnoblauch" <jknoblauch@.ttinteractive.comwrote in message
news:1175002706.897361.89220@.b75g2000hsg.googlegro ups.com...
Hi Everybody,

The HTTP HEADERS were remove by IIS 6.0.

To solve the problem go to :
1) Properties on the web root
2) Click HTTP HEADERS tab
3) Custom Headers panel
4) Click Add...
Key : P3P
Value : CP="CAO PSA OUR"

Hope that will help some one.
Johnny

On 26 mar, 16:45, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:

Quote:

Originally Posted by

Hi,
>
We only have this problem with IIS 6.0.
>
We configure the p3p.xml and the p3pconfig.xml correctly in the root
domain of our server.
We configured the P3P in the application begin request in
global.asax :
Context.Response.AddHeader("P3P", @."CP=""CAO PSA OUR""");
>
But the problem persist we have no solution, please tell me if you
find one.
>
Thanks,
Johnny
>
On 2 fv, 19:52, "Khafancoder" <khafanco...@.gmail.comwrote:
>
>
>

Quote:

Originally Posted by

Hi guys,


>

Quote:

Originally Posted by

we are developing a webapplication which let user create their own
virtual website on their real domain.
in other word, users could create their virtual web-sites by this
application and app will recognize each website
by its domain.


>

Quote:

Originally Posted by

we needed a passport system (like .Net Passport) to identify users in
all of these virtual web-sites (& various domains)
we build this system upon third-party cookies by making request from
each site to passportserver using import script tags.


>

Quote:

Originally Posted by

now the problem is : IE 6.0, 7.0 won't let the web-applciation to
create thirdparty cookies by default and users have to add passport
server domain to TrustedZone,i heared that p3p could solve this
problem but id don't know how !? should we register our domains in
some database ? is it free ?


>

Quote:

Originally Posted by

Thanks in advance- Masquer le texte des messages prcdents -


>
- Afficher le texte des messages prcdents -

Third-Part Cookies blocked by IE

Hi guys,
we are developing a webapplication which let user create their own
virtual website on their real domain.
in other word, users could create their virtual web-sites by this
application and app will recognize each website
by its domain.
we needed a passport system (like .Net Passport) to identify users in
all of these virtual web-sites (& various domains)
we build this system upon third-party cookies by making request from
each site to passportserver using import script tags.
now the problem is : IE 6.0, 7.0 won't let the web-applciation to
create thirdparty cookies by default and users have to add passport
server domain to TrustedZone,i heared that p3p could solve this
problem but id don't know how !? should we register our domains in
some database ? is it free ?
Thanks in advanceHi,
We only have this problem with IIS 6.0.
We configure the p3p.xml and the p3pconfig.xml correctly in the root
domain of our server.
We configured the P3P in the application begin request in
global.asax :
Context.Response.AddHeader("P3P", @."CP=3D""CAO PSA OUR""");
But the problem persist we have no solution, please tell me if you
find one.
Thanks,
Johnny
On 2 f=E9v, 19:52, "Khafancoder" <khafanco...@.gmail.com> wrote:
> Hi guys,
> we are developing a webapplication which let user create their own
> virtual website on their real domain.
> in other word, users could create their virtual web-sites by this
> application and app will recognize each website
> by its domain.
> we needed a passport system (like .Net Passport) to identify users in
> all of these virtual web-sites (& various domains)
> we build this system upon third-party cookies by making request from
> each site to passportserver using import script tags.
> now the problem is : IE 6.0, 7.0 won't let the web-applciation to
> create thirdparty cookies by default and users have to add passport
> server domain to TrustedZone,i heared that p3p could solve this
> problem but id don't know how !? should we register our domains in
> some database ? is it free ?
> Thanks in advance
Hi Everybody,
The HTTP HEADERS were remove by IIS 6.0.
To solve the problem go to :
1) Properties on the web root
2) Click HTTP HEADERS tab
3) Custom Headers panel
4) Click Add...
Key : P3P
Value : CP=3D"CAO PSA OUR"
Hope that will help some one.
Johnny
On 26 mar, 16:45, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:
> Hi,
> We only have this problem with IIS 6.0.
> We configure the p3p.xml and the p3pconfig.xml correctly in the root
> domain of our server.
> We configured the P3P in the application begin request in
> global.asax :
> Context.Response.AddHeader("P3P", @."CP=3D""CAO PSA OUR""");
> But the problem persist we have no solution, please tell me if you
> find one.
> Thanks,
> Johnny
> On 2 f=E9v, 19:52, "Khafancoder" <khafanco...@.gmail.com> wrote:
>
>
>
>
>
>
> - Afficher le texte des messages pr=E9c=E9dents -
Better, just look at this url : http://support.microsoft.com/kb/324013/en-us
On 27 mar, 15:38, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:
> Hi Everybody,
> The HTTP HEADERS were remove by IIS 6.0.
> To solve the problem go to :
> 1) Properties on the web root
> 2) Click HTTP HEADERS tab
> 3) Custom Headers panel
> 4) Click Add...
> Key : P3P
> Value : CP=3D"CAO PSA OUR"
> Hope that will help some one.
> Johnny
> On 26 mar, 16:45, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
messages pr=E9c=E9dents -
> - Afficher le texte des messages pr=E9c=E9dents -
Well, I am doing it same way you did on my site
Response.AddHeader("P3P", @."CP=\"CAO PSA OUR\"");
And nothing gets removed by IIS. I have IIS 6.0 on Win2003
I was a bit when you said it's not working but had no idea why. You
can download tool called fiddler (www.fiddlertool.com/ )
This is Microsoft tool to spy on browser requests and watch what is actually
your server sends to browser (or vise versa)
George
"JohnnyKnoblauch" <jknoblauch@.ttinteractive.com> wrote in message
news:1175002706.897361.89220@.b75g2000hsg.googlegroups.com...
Hi Everybody,
The HTTP HEADERS were remove by IIS 6.0.
To solve the problem go to :
1) Properties on the web root
2) Click HTTP HEADERS tab
3) Custom Headers panel
4) Click Add...
Key : P3P
Value : CP="CAO PSA OUR"
Hope that will help some one.
Johnny
On 26 mar, 16:45, "JohnnyKnoblauch" <jknobla...@.ttinteractive.com>
wrote:
> Hi,
> We only have this problem with IIS 6.0.
> We configure the p3p.xml and the p3pconfig.xml correctly in the root
> domain of our server.
> We configured the P3P in the application begin request in
> global.asax :
> Context.Response.AddHeader("P3P", @."CP=""CAO PSA OUR""");
> But the problem persist we have no solution, please tell me if you
> find one.
> Thanks,
> Johnny
> On 2 fv, 19:52, "Khafancoder" <khafanco...@.gmail.com> wrote:
>
>
>
>
>
>
> - Afficher le texte des messages prcdents -

Saturday, March 24, 2012

This Membership Provider has not been configured to support password retrieval.

Hi,
When an anonymous user has created an new account (with the CreateUserWizard
control), i want to let asp.net generate a password and to send it to the
address of the email provided by the new membershipuser in the
CreateUserWizard control.
i think i need to define a custom provider for membership and i tried this:
web.config:
--
<connectionStrings>
<add name="aspnetdb" connectionString="Data
Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<authentication mode="Forms" />
<membership>
<providers>
<add name="MyMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="aspnetdb"
enablePasswordRetrieval="true"
enablePasswordReset="true"
passwordFormat="Encrypted"
requiresQuestionAndAnswer="true"
applicationName="/"
/>
</providers>
</membership>
code-behind:
--
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If User.Identity.IsAuthenticated Then
Dim pw As String
pw = Membership.GetUser.GetPassword.ToString
End If
End Sub
But this generate the error:
"This Membership Provider has not been configured to support password
retrieval."
at line "pw = Membership.GetUser.GetPassword.ToString"
The problem is, i think, that it still the default provider which is used
and not my custom one. But i don't knwo how to fix it.Maybe i don't even
need to defiine a custom provider and maybe i can use the default?
Thanks for help
BenI changed this in web.config:
<membership defaultProvider="MyMembershipProvider">
but now, i get this error:
"You must specify a non-autogenerated machine key to store passwords in the
encrypted format. Either specify a different passwordFormat, or change the
machineKey configuration to use a non-autogenerated decryption key."
Do i have to change the line in web.config: passwordFormat="Encrypted" in
"Clear"? But then the security is not guaranteed?
"Ben" <b@.en.sd> schreef in bericht
news:OvshZOCgHHA.2396@.TK2MSFTNGP04.phx.gbl...
> Hi,
> When an anonymous user has created an new account (with the
> CreateUserWizard control), i want to let asp.net generate a password and
> to send it to the address of the email provided by the new membershipuser
> in the CreateUserWizard control.
> i think i need to define a custom provider for membership and i tried
> this:
> web.config:
> --
> <connectionStrings>
> <add name="aspnetdb" connectionString="Data
> Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\ASPNETDB.MDF;Integrat
ed
> Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
> </connectionStrings>
> <authentication mode="Forms" />
> <membership>
> <providers>
> <add name="MyMembershipProvider"
> type="System.Web.Security.SqlMembershipProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="aspnetdb"
> enablePasswordRetrieval="true"
> enablePasswordReset="true"
> passwordFormat="Encrypted"
> requiresQuestionAndAnswer="true"
> applicationName="/"
> />
> </providers>
> </membership>
> code-behind:
> --
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
> If User.Identity.IsAuthenticated Then
> Dim pw As String
> pw = Membership.GetUser.GetPassword.ToString
> End If
> End Sub
>
> But this generate the error:
> "This Membership Provider has not been configured to support password
> retrieval."
> at line "pw = Membership.GetUser.GetPassword.ToString"
> The problem is, i think, that it still the default provider which is used
> and not my custom one. But i don't knwo how to fix it.Maybe i don't even
> need to defiine a custom provider and maybe i can use the default?
> Thanks for help
> Ben
>
>

This Membership Provider has not been configured to support password retrieval.

Hi,

When an anonymous user has created an new account (with the CreateUserWizard
control), i want to let asp.net generate a password and to send it to the
address of the email provided by the new membershipuser in the
CreateUserWizard control.

i think i need to define a custom provider for membership and i tried this:

web.config:
----
<connectionStrings>
<add name="aspnetdb" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>

<authentication mode="Forms" />

<membership>
<providers>
<add name="MyMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="aspnetdb"
enablePasswordRetrieval="true"
enablePasswordReset="true"
passwordFormat="Encrypted"
requiresQuestionAndAnswer="true"
applicationName="/"
/>
</providers>
</membership>
code-behind:
----
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If User.Identity.IsAuthenticated Then
Dim pw As String
pw = Membership.GetUser.GetPassword.ToString
End If
End Sub

But this generate the error:
"This Membership Provider has not been configured to support password
retrieval."
at line "pw = Membership.GetUser.GetPassword.ToString"

The problem is, i think, that it still the default provider which is used
and not my custom one. But i don't knwo how to fix it.Maybe i don't even
need to defiine a custom provider and maybe i can use the default?

Thanks for help
BenI changed this in web.config:

<membership defaultProvider="MyMembershipProvider">

but now, i get this error:
"You must specify a non-autogenerated machine key to store passwords in the
encrypted format. Either specify a different passwordFormat, or change the
machineKey configuration to use a non-autogenerated decryption key."

Do i have to change the line in web.config: passwordFormat="Encrypted" in
"Clear"? But then the security is not guaranteed?

"Ben" <b@.en.sdschreef in bericht
news:OvshZOCgHHA.2396@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

Hi,
>
When an anonymous user has created an new account (with the
CreateUserWizard control), i want to let asp.net generate a password and
to send it to the address of the email provided by the new membershipuser
in the CreateUserWizard control.
>
i think i need to define a custom provider for membership and i tried
this:
>
web.config:
----
<connectionStrings>
<add name="aspnetdb" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
>
<authentication mode="Forms" />
>
<membership>
<providers>
<add name="MyMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="aspnetdb"
enablePasswordRetrieval="true"
enablePasswordReset="true"
passwordFormat="Encrypted"
requiresQuestionAndAnswer="true"
applicationName="/"
/>
</providers>
</membership>
code-behind:
----
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If User.Identity.IsAuthenticated Then
Dim pw As String
pw = Membership.GetUser.GetPassword.ToString
End If
End Sub
>
>
But this generate the error:
"This Membership Provider has not been configured to support password
retrieval."
at line "pw = Membership.GetUser.GetPassword.ToString"
>
The problem is, i think, that it still the default provider which is used
and not my custom one. But i don't knwo how to fix it.Maybe i don't even
need to defiine a custom provider and maybe i can use the default?
>
Thanks for help
Ben
>
>
>
>

this object is read only.

I'm trying to integrate my site with the communityserver forum, and I'm inheriting the forum User class to my user class.
I want to write

AspNetForums.Components.User MyUser = AspNetForums.Users.GetUser(UserID,true);
this = (MyNamespace.User) MyUser;

but it says <this> is read only.
Is there a way to do this without having to write everything out like this?

AspNetForums.Components.User MyUser = AspNetForums.Users.GetUser(UserID,true);
this.YahooIM = MyUser.YahooIM;
this.WebLog = MyUser.WebLog;
this.WebAddress = MyUser.WebAddress;
this.Username = MyUser.Username;

Unless you create a SetProps() method that you pass these properties in, and this function does the assignment. You have to do the property assignment.

Brian
Thanks. Man, this object has like 40 properties.
Yeah, that happens, however, a more dynamic solution (like maybe reflection) could give you performance problems, whereas a little bit of coding will give you less headaches in the long run.

Brian

Tuesday, March 13, 2012

Thread timeouts

Hi,
I have web based email management system where a user can login, create an
email and then send it to multiple recipients.
The email component I use generates all of the physical .eml files when they
click send. When a user is sending to 120, 000 recipients at once the page
times out.
I was thinking of using a separate worker thread for creating the email
messages (I dont have to worry about sending because the files get put into
a pickup directory that gets read by an SMTP component). My main concern
is - would the thread timeout at all, when trying to generate so many files?
Thanks in advance
GrahamHi Graham:
Threads do not time out, so I wouldn't have this concern.
Applications can timeout, however. I can configure an application pool in
Win2003 to shut down an app after x minutes of inactivity. A background thre
ad
isn't considered activity though - only incoming requests are. Something
to look for in your config.
Scott
http://www.OdeToCode.com/blogs/scott/

> Hi,
> I have web based email management system where a user can login,
> create an
> email and then send it to multiple recipients.
> The email component I use generates all of the physical .eml files
> when they
> click send. When a user is sending to 120, 000 recipients at once the
> page
> times out.
> I was thinking of using a separate worker thread for creating the
> email
> messages (I dont have to worry about sending because the files get put
> into
> a pickup directory that gets read by an SMTP component). My main
> concern
> is - would the thread timeout at all, when trying to generate so many
> files?
> Thanks in advance
> Graham

Thread timeouts

Hi,
I have web based email management system where a user can login, create an
email and then send it to multiple recipients.
The email component I use generates all of the physical .eml files when they
click send. When a user is sending to 120, 000 recipients at once the page
times out.
I was thinking of using a separate worker thread for creating the email
messages (I dont have to worry about sending because the files get put into
a pickup directory that gets read by an SMTP component). My main concern
is - would the thread timeout at all, when trying to generate so many files?

Thanks in advance
GrahamHi Graham:

Threads do not time out, so I wouldn't have this concern.

Applications can timeout, however. I can configure an application pool in
Win2003 to shut down an app after x minutes of inactivity. A background thread
isn't considered activity though - only incoming requests are. Something
to look for in your config.

--
Scott
http://www.OdeToCode.com/blogs/scott/

> Hi,
> I have web based email management system where a user can login,
> create an
> email and then send it to multiple recipients.
> The email component I use generates all of the physical .eml files
> when they
> click send. When a user is sending to 120, 000 recipients at once the
> page
> times out.
> I was thinking of using a separate worker thread for creating the
> email
> messages (I dont have to worry about sending because the files get put
> into
> a pickup directory that gets read by an SMTP component). My main
> concern
> is - would the thread timeout at all, when trying to generate so many
> files?
> Thanks in advance
> Graham

Thread was being aborted

Any Idea why we get this error, its happening in only one page and that too
first time user visits that page,in the below "GetData" is a method which
gets the data from SQL Server, but some times it is taking time to get data
and throwing this error i think it has to throw "Timed Out" instead of this
"Thread Abort" error. any idea why we get this error?
Exception Type: System.Threading.ThreadAbortException
ExceptionState: System.Web.HttpApplication+CancelModuleException
Message: Thread was being aborted.
TargetSite: System.Data.DataSet GetData(RPID,
System.Data.SqlClient.SqlCommand)Unless you post the full code around where the error happens, then I can
only guess. One common cause for this error is that you have a
Response.Redirect statement enclosed within a try...catch

--
[note: if this post answers your question, you can mark it as an answer
using the web-based newsreader functions]
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com

"xsluser" wrote:

> Any Idea why we get this error, its happening in only one page and that too
> first time user visits that page,in the below "GetData" is a method which
> gets the data from SQL Server, but some times it is taking time to get data
> and throwing this error i think it has to throw "Timed Out" instead of this
> "Thread Abort" error. any idea why we get this error?
> Exception Type: System.Threading.ThreadAbortException
> ExceptionState: System.Web.HttpApplication+CancelModuleException
> Message: Thread was being aborted.
> TargetSite: System.Data.DataSet GetData(RPID,
> System.Data.SqlClient.SqlCommand)
By default SQL Command has 30 second to finish.
If it did not finish then it's aborted.

Look at Command.CommandTimeout value and increase it.

George.

"xsluser" <xsluser@.discussions.microsoft.com> wrote in message news:F2E4E54F-7A47-47CE-BDC9-8FBDA9A9BD3F@.microsoft.com...
Any Idea why we get this error, its happening in only one page and that too
first time user visits that page,in the below "GetData" is a method which
gets the data from SQL Server, but some times it is taking time to get data
and throwing this error i think it has to throw "Timed Out" instead of this
"Thread Abort" error. any idea why we get this error?
Exception Type: System.Threading.ThreadAbortException
ExceptionState: System.Web.HttpApplication+CancelModuleException
Message: Thread was being aborted.
TargetSite: System.Data.DataSet GetData(RPID,
System.Data.SqlClient.SqlCommand)

Thread was being aborted

Any Idea why we get this error, its happening in only one page and that too
first time user visits that page,in the below "GetData" is a method which
gets the data from SQL Server, but some times it is taking time to get data
and throwing this error i think it has to throw "Timed Out" instead of this
"Thread Abort" error. any idea why we get this error?
Exception Type: System.Threading.ThreadAbortException
ExceptionState: System.Web.HttpApplication+CancelModuleException
Message: Thread was being aborted.
TargetSite: System.Data.DataSet GetData(RPID,
System.Data.SqlClient.SqlCommand)Unless you post the full code around where the error happens, then I can
only guess. One common cause for this error is that you have a
Response.Redirect statement enclosed within a try...catch
[note: if this post answers your question, you can mark it as an answer
using the web-based newsreader functions]
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"xsluser" wrote:

> Any Idea why we get this error, its happening in only one page and that to
o
> first time user visits that page,in the below "GetData" is a method which
> gets the data from SQL Server, but some times it is taking time to get dat
a
> and throwing this error i think it has to throw "Timed Out" instead of thi
s
> "Thread Abort" error. any idea why we get this error?
> Exception Type: System.Threading.ThreadAbortException
> ExceptionState: System.Web.HttpApplication+CancelModuleException
> Message: Thread was being aborted.
> TargetSite: System.Data.DataSet GetData(RPID,
> System.Data.SqlClient.SqlCommand)
By default SQL Command has 30 second to finish.
If it did not finish then it's aborted.
Look at Command.CommandTimeout value and increase it.
George.
"xsluser" <xsluser@.discussions.microsoft.com> wrote in message news:F2E4E54F
-7A47-47CE-BDC9-8FBDA9A9BD3F@.microsoft.com...
Any Idea why we get this error, its happening in only one page and that too
first time user visits that page,in the below "GetData" is a method which
gets the data from SQL Server, but some times it is taking time to get data
and throwing this error i think it has to throw "Timed Out" instead of this
"Thread Abort" error. any idea why we get this error?
Exception Type: System.Threading.ThreadAbortException
ExceptionState: System.Web.HttpApplication+CancelModuleException
Message: Thread was being aborted.
TargetSite: System.Data.DataSet GetData(RPID,
System.Data.SqlClient.SqlCommand)

Thread was being aborted error message

Hi all, I have a user control which raises an event to the parent page when
a person clicks on a link in a datagrid.
In the event handler inside the parent page I construct a url to redirect to
containing information sent from the datagrid.
It all works fine on my local machine but when I send it to the live server
I receive "The thread was being aborted"
Doing some googling suggested that I use
Response.Redirect("./myurl.aspx?ID=" + variable,false);
to allow the current thread to continue executing.
This stops the error but what I am now finding is that the redirect does not
have the querystring attributes attached to it..
e.g. instead of looking like this...
http://www.website.com/myurl.aspx?ID=5
it looks like
http://www.website.com/myurl.aspx
It's like the redirect *never* happens...
Help appreciated
Thanks
MarkPut your Response.Redirect back to the way it was, without the false
parameter.
Then wrap it in a Try/Catch statement to eat the error that's raised from
the redirect.
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Jimi" <dontspam@.me.com> wrote in message
news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
> Hi all, I have a user control which raises an event to the parent page
> when a person clicks on a link in a datagrid.
> In the event handler inside the parent page I construct a url to redirect
> to containing information sent from the datagrid.
> It all works fine on my local machine but when I send it to the live
> server I receive "The thread was being aborted"
> Doing some googling suggested that I use
> Response.Redirect("./myurl.aspx?ID=" + variable,false);
> to allow the current thread to continue executing.
> This stops the error but what I am now finding is that the redirect does
> not have the querystring attributes attached to it..
> e.g. instead of looking like this...
> http://www.website.com/myurl.aspx?ID=5
> it looks like
> http://www.website.com/myurl.aspx
>
> It's like the redirect *never* happens...
> Help appreciated
> Thanks
> Mark
>
>
Hi Steve, you mean like this?
try
{
Response.Redirect("./myurl.aspx?ID=" + variable);
}catch (Exception ex)
{
}
I have seen other people say take the Response.Redirect("./myurl.aspx?ID=" +
variable,false) out of the try catch block...
I understand why this is hapenning but cannot understand how to fix it...
Thanks again Steve..
Cheers
Mark
"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:eaqxRZEXGHA.3660@.TK2MSFTNGP04.phx.gbl...
> Put your Response.Redirect back to the way it was, without the false
> parameter.
> Then wrap it in a Try/Catch statement to eat the error that's raised from
> the redirect.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
> "Jimi" <dontspam@.me.com> wrote in message
> news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
>
Yes, that's what I'm suggesting. Does it work for you?
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Jimi" <dontspam@.me.com> wrote in message
news:efW%23QfEXGHA.4324@.TK2MSFTNGP03.phx.gbl...
> Hi Steve, you mean like this?
> try
> {
> Response.Redirect("./myurl.aspx?ID=" + variable);
> }catch (Exception ex)
> {
> }
> I have seen other people say take the Response.Redirect("./myurl.aspx?ID="
> + variable,false) out of the try catch block...
> I understand why this is hapenning but cannot understand how to fix it...
> Thanks again Steve..
> Cheers
> Mark
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:eaqxRZEXGHA.3660@.TK2MSFTNGP04.phx.gbl...
>
Hi Steve, no unfortunately not.
I did a try catch and caught the exception like so:
catch (Exception ex)
Output of ex.Message was Thread was being aborted.
and ex.Source = mscorlib
Thanks again for your help
Cheers
Mark
"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OlCNUwFXGHA.3848@.TK2MSFTNGP05.phx.gbl...
> Yes, that's what I'm suggesting. Does it work for you?
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
> "Jimi" <dontspam@.me.com> wrote in message
> news:efW%23QfEXGHA.4324@.TK2MSFTNGP03.phx.gbl...
>
Hi all, in the end due to time constraints I used a JavaScript redirect and
now it all works fine.
Thanks for your help Steve :)
Cheers
Mark
"Jimi" <dontspam@.me.com> wrote in message
news:uq2px$FXGHA.752@.TK2MSFTNGP02.phx.gbl...
> Hi Steve, no unfortunately not.
> I did a try catch and caught the exception like so:
> catch (Exception ex)
> Output of ex.Message was Thread was being aborted.
> and ex.Source = mscorlib
> Thanks again for your help
> Cheers
> Mark
>
>
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:OlCNUwFXGHA.3848@.TK2MSFTNGP05.phx.gbl...
>

Thread was being aborted error message

Hi all, I have a user control which raises an event to the parent page when
a person clicks on a link in a datagrid.

In the event handler inside the parent page I construct a url to redirect to
containing information sent from the datagrid.

It all works fine on my local machine but when I send it to the live server
I receive "The thread was being aborted"

Doing some googling suggested that I use

Response.Redirect("./myurl.aspx?ID=" + variable,false);

to allow the current thread to continue executing.

This stops the error but what I am now finding is that the redirect does not
have the querystring attributes attached to it..

e.g. instead of looking like this...

http://www.website.com/myurl.aspx?ID=5

it looks like

http://www.website.com/myurl.aspx

It's like the redirect *never* happens...

Help appreciated
Thanks
MarkPut your Response.Redirect back to the way it was, without the false
parameter.
Then wrap it in a Try/Catch statement to eat the error that's raised from
the redirect.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Jimi" <dontspam@.me.com> wrote in message
news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
> Hi all, I have a user control which raises an event to the parent page
> when a person clicks on a link in a datagrid.
> In the event handler inside the parent page I construct a url to redirect
> to containing information sent from the datagrid.
> It all works fine on my local machine but when I send it to the live
> server I receive "The thread was being aborted"
> Doing some googling suggested that I use
> Response.Redirect("./myurl.aspx?ID=" + variable,false);
> to allow the current thread to continue executing.
> This stops the error but what I am now finding is that the redirect does
> not have the querystring attributes attached to it..
> e.g. instead of looking like this...
> http://www.website.com/myurl.aspx?ID=5
> it looks like
> http://www.website.com/myurl.aspx
>
> It's like the redirect *never* happens...
> Help appreciated
> Thanks
> Mark
Hi Steve, you mean like this?

try
{
Response.Redirect("./myurl.aspx?ID=" + variable);

}catch (Exception ex)
{

}

I have seen other people say take the Response.Redirect("./myurl.aspx?ID=" +
variable,false) out of the try catch block...
I understand why this is hapenning but cannot understand how to fix it...

Thanks again Steve..
Cheers
Mark

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:eaqxRZEXGHA.3660@.TK2MSFTNGP04.phx.gbl...
> Put your Response.Redirect back to the way it was, without the false
> parameter.
> Then wrap it in a Try/Catch statement to eat the error that's raised from
> the redirect.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
> "Jimi" <dontspam@.me.com> wrote in message
> news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
>> Hi all, I have a user control which raises an event to the parent page
>> when a person clicks on a link in a datagrid.
>>
>> In the event handler inside the parent page I construct a url to redirect
>> to containing information sent from the datagrid.
>>
>> It all works fine on my local machine but when I send it to the live
>> server I receive "The thread was being aborted"
>>
>> Doing some googling suggested that I use
>>
>> Response.Redirect("./myurl.aspx?ID=" + variable,false);
>>
>> to allow the current thread to continue executing.
>>
>> This stops the error but what I am now finding is that the redirect does
>> not have the querystring attributes attached to it..
>>
>> e.g. instead of looking like this...
>>
>> http://www.website.com/myurl.aspx?ID=5
>>
>> it looks like
>>
>> http://www.website.com/myurl.aspx
>>
>>
>> It's like the redirect *never* happens...
>>
>> Help appreciated
>> Thanks
>> Mark
>>
>>
>>
Yes, that's what I'm suggesting. Does it work for you?

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Jimi" <dontspam@.me.com> wrote in message
news:efW%23QfEXGHA.4324@.TK2MSFTNGP03.phx.gbl...
> Hi Steve, you mean like this?
> try
> {
> Response.Redirect("./myurl.aspx?ID=" + variable);
> }catch (Exception ex)
> {
> }
> I have seen other people say take the Response.Redirect("./myurl.aspx?ID="
> + variable,false) out of the try catch block...
> I understand why this is hapenning but cannot understand how to fix it...
> Thanks again Steve..
> Cheers
> Mark
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:eaqxRZEXGHA.3660@.TK2MSFTNGP04.phx.gbl...
>> Put your Response.Redirect back to the way it was, without the false
>> parameter.
>> Then wrap it in a Try/Catch statement to eat the error that's raised from
>> the redirect.
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>>
>>
>> "Jimi" <dontspam@.me.com> wrote in message
>> news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
>>> Hi all, I have a user control which raises an event to the parent page
>>> when a person clicks on a link in a datagrid.
>>>
>>> In the event handler inside the parent page I construct a url to
>>> redirect to containing information sent from the datagrid.
>>>
>>> It all works fine on my local machine but when I send it to the live
>>> server I receive "The thread was being aborted"
>>>
>>> Doing some googling suggested that I use
>>>
>>> Response.Redirect("./myurl.aspx?ID=" + variable,false);
>>>
>>> to allow the current thread to continue executing.
>>>
>>> This stops the error but what I am now finding is that the redirect does
>>> not have the querystring attributes attached to it..
>>>
>>> e.g. instead of looking like this...
>>>
>>> http://www.website.com/myurl.aspx?ID=5
>>>
>>> it looks like
>>>
>>> http://www.website.com/myurl.aspx
>>>
>>>
>>> It's like the redirect *never* happens...
>>>
>>> Help appreciated
>>> Thanks
>>> Mark
>>>
>>>
>>>
>>
>>
Hi Steve, no unfortunately not.

I did a try catch and caught the exception like so:

catch (Exception ex)

Output of ex.Message was Thread was being aborted.
and ex.Source = mscorlib

Thanks again for your help
Cheers
Mark

"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OlCNUwFXGHA.3848@.TK2MSFTNGP05.phx.gbl...
> Yes, that's what I'm suggesting. Does it work for you?
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
> "Jimi" <dontspam@.me.com> wrote in message
> news:efW%23QfEXGHA.4324@.TK2MSFTNGP03.phx.gbl...
>> Hi Steve, you mean like this?
>>
>> try
>> {
>> Response.Redirect("./myurl.aspx?ID=" + variable);
>>
>> }catch (Exception ex)
>> {
>>
>> }
>>
>> I have seen other people say take the
>> Response.Redirect("./myurl.aspx?ID=" + variable,false) out of the try
>> catch block...
>> I understand why this is hapenning but cannot understand how to fix it...
>>
>> Thanks again Steve..
>> Cheers
>> Mark
>>
>> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
>> news:eaqxRZEXGHA.3660@.TK2MSFTNGP04.phx.gbl...
>>> Put your Response.Redirect back to the way it was, without the false
>>> parameter.
>>> Then wrap it in a Try/Catch statement to eat the error that's raised
>>> from the redirect.
>>>
>>> --
>>> I hope this helps,
>>> Steve C. Orr, MCSD, MVP
>>> http://SteveOrr.net
>>>
>>>
>>>
>>> "Jimi" <dontspam@.me.com> wrote in message
>>> news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
>>>> Hi all, I have a user control which raises an event to the parent page
>>>> when a person clicks on a link in a datagrid.
>>>>
>>>> In the event handler inside the parent page I construct a url to
>>>> redirect to containing information sent from the datagrid.
>>>>
>>>> It all works fine on my local machine but when I send it to the live
>>>> server I receive "The thread was being aborted"
>>>>
>>>> Doing some googling suggested that I use
>>>>
>>>> Response.Redirect("./myurl.aspx?ID=" + variable,false);
>>>>
>>>> to allow the current thread to continue executing.
>>>>
>>>> This stops the error but what I am now finding is that the redirect
>>>> does not have the querystring attributes attached to it..
>>>>
>>>> e.g. instead of looking like this...
>>>>
>>>> http://www.website.com/myurl.aspx?ID=5
>>>>
>>>> it looks like
>>>>
>>>> http://www.website.com/myurl.aspx
>>>>
>>>>
>>>> It's like the redirect *never* happens...
>>>>
>>>> Help appreciated
>>>> Thanks
>>>> Mark
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
Hi all, in the end due to time constraints I used a JavaScript redirect and
now it all works fine.

Thanks for your help Steve :)
Cheers
Mark
"Jimi" <dontspam@.me.com> wrote in message
news:uq2px$FXGHA.752@.TK2MSFTNGP02.phx.gbl...
> Hi Steve, no unfortunately not.
> I did a try catch and caught the exception like so:
> catch (Exception ex)
> Output of ex.Message was Thread was being aborted.
> and ex.Source = mscorlib
> Thanks again for your help
> Cheers
> Mark
>
>
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:OlCNUwFXGHA.3848@.TK2MSFTNGP05.phx.gbl...
>> Yes, that's what I'm suggesting. Does it work for you?
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>>
>> "Jimi" <dontspam@.me.com> wrote in message
>> news:efW%23QfEXGHA.4324@.TK2MSFTNGP03.phx.gbl...
>>> Hi Steve, you mean like this?
>>>
>>> try
>>> {
>>> Response.Redirect("./myurl.aspx?ID=" + variable);
>>>
>>> }catch (Exception ex)
>>> {
>>>
>>> }
>>>
>>> I have seen other people say take the
>>> Response.Redirect("./myurl.aspx?ID=" + variable,false) out of the try
>>> catch block...
>>> I understand why this is hapenning but cannot understand how to fix
>>> it...
>>>
>>> Thanks again Steve..
>>> Cheers
>>> Mark
>>>
>>> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
>>> news:eaqxRZEXGHA.3660@.TK2MSFTNGP04.phx.gbl...
>>>> Put your Response.Redirect back to the way it was, without the false
>>>> parameter.
>>>> Then wrap it in a Try/Catch statement to eat the error that's raised
>>>> from the redirect.
>>>>
>>>> --
>>>> I hope this helps,
>>>> Steve C. Orr, MCSD, MVP
>>>> http://SteveOrr.net
>>>>
>>>>
>>>>
>>>> "Jimi" <dontspam@.me.com> wrote in message
>>>> news:uls70dBXGHA.1352@.TK2MSFTNGP05.phx.gbl...
>>>>> Hi all, I have a user control which raises an event to the parent page
>>>>> when a person clicks on a link in a datagrid.
>>>>>
>>>>> In the event handler inside the parent page I construct a url to
>>>>> redirect to containing information sent from the datagrid.
>>>>>
>>>>> It all works fine on my local machine but when I send it to the live
>>>>> server I receive "The thread was being aborted"
>>>>>
>>>>> Doing some googling suggested that I use
>>>>>
>>>>> Response.Redirect("./myurl.aspx?ID=" + variable,false);
>>>>>
>>>>> to allow the current thread to continue executing.
>>>>>
>>>>> This stops the error but what I am now finding is that the redirect
>>>>> does not have the querystring attributes attached to it..
>>>>>
>>>>> e.g. instead of looking like this...
>>>>>
>>>>> http://www.website.com/myurl.aspx?ID=5
>>>>>
>>>>> it looks like
>>>>>
>>>>> http://www.website.com/myurl.aspx
>>>>>
>>>>>
>>>>> It's like the redirect *never* happens...
>>>>>
>>>>> Help appreciated
>>>>> Thanks
>>>>> Mark
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>

Thread was being aborted exception in user control

I have an .ascx user control for creating dynamic charts from a datatable, which uses an external .aspx page for rendering the chart as a .png image. The control is not functioning as expected (ie. the chart image is not being saved in the specified folder), with the containing page catching a "Thread was being aborted" exception. The containing page itself is rendered correctly, and there is no further use of Response.Redirect or Server.Transfer after the page is loaded. Could the exception arise from the statement within the code behind file of the control where the control's image source is set:
imgGDI.imageURL = "somepage.apsx"
or is the only source likely to be the previous Server.Transfer call to the containing page? I have read other threads regarding the 'Thread was being aborted' exception and Try...Catch blocks, but the solutions detailed do not seem to have any effect.
Any suggestions most welcome.The Thread being aborted exception is the natural generation of a Server.Transfer or Response.Redirect. However a Reponse.Redirect has an option to supress the exception. Response.Redirect("foo.aspx", false);
We're using Server.Transfer("foo.aspx", false). The problem seems to be intermittant at the moment though, which is why I thought the problem may be to do with the external .aspx pages being used for the image source.