Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Monday, March 26, 2012

Hindi fonts

Hello all

Using hindi fonts in the asp.net, is that possible...

admin area adding a new data in the database and when the save and all value save on the database

HINDI FONTS Using in backends.......................

Hi,

Check this article : http://www.codeproject.com/useritems/localization.asp

Hope this helps,

Vivek

Friday, March 23, 2012

Highlight Keywords

I am using asp.net (C#) to create full text searching using SQL Server
2005 in our application. Everything is working fine, but I am trying
to highlight the resultset keywords from the full text results. Can
sql server provide you with a way to highlight the keywords from the
full text search?
I was able to kind of hack it by programatically replacing my keyword
search terms with the sql server resultset. However, when I do certain
searches, like "Frank's", sql server will return Frank using my
CONTAINS query, and I want the other results like "Frank" to be
highlighted too. Anyone know a good way to go about doing this?
Thanks
You have to implement your own version of Porter stemmer algorithm for this.
You can use Indexing Services for this, here is a link describing how to do
this.
http://www.indexserverfaq.com/sqlhithighlighting.htm
"guate911" <guatemala911@.gmail.com> wrote in message
news:1179417689.771131.84700@.k79g2000hse.googlegro ups.com...
>I am using asp.net (C#) to create full text searching using SQL Server
> 2005 in our application. Everything is working fine, but I am trying
> to highlight the resultset keywords from the full text results. Can
> sql server provide you with a way to highlight the keywords from the
> full text search?
> I was able to kind of hack it by programatically replacing my keyword
> search terms with the sql server resultset. However, when I do certain
> searches, like "Frank's", sql server will return Frank using my
> CONTAINS query, and I want the other results like "Frank" to be
> highlighted too. Anyone know a good way to go about doing this?
> Thanks
>

Wednesday, March 21, 2012

High load SqlServer failes throwing error 3926 - what is that?

It manisfests itself in our SqlClient use (i.e. .NET 2.0) on one client side only...

with dozens of messages like:

ASP.global_asax - System.Data.SqlClient.SqlException : Server failed to resume the transaction, desc: 3500000c5b.

The transaction active in this session has been committed or aborted by another session.

That poins to SQL Server error 3926.

But I have NO clue how that comes. Anyone an idea? The code works flawless under dozens of other systems.

This looks like a exception throwed by SQL engine.

Guess what - it is SQL Error 3926 indicated by SQL Server. I already found that out and I already said so.

From "The transaction active in this session has been committed or aborted by another session.", I think more than one session in your application are accessing one transaction.

No chance. Here is the problem. I have, in the complete application, exactly 8 methods that do SQL processing. EVERY ONE of them:

* Gets a connection
* Establishes a transaction
* does it's job
* Closes the transaction
* Closes the connection

There is no open transaction ever left. All conenctions are properly disposed in a finally clause of a try/catch block in the method.

In fact, all my methods look like this:

Start:

IDbConnection connection = GetConnection ();
IDbTransaction txn = null;
if (System.Transactions.Transaction.Current == null) {
txn = connection.BeginTransaction ();
}
try {

processing

} finally {
if (txn == null) {
txn.Rollback ();
txn.Dispose ();
txn = null;
}
if (connection != null) {
connection.Close ();
connection.Dispose ();
connection = null;
}

If an error would happen in the finally block, I would see it. This is the pattern ALL my methods follow. This is the only location I actually open a connection. And I have a total of 8 methods that actually use the GetConnection method - and all run through the same pattern.

That is why I am ripping my hairs out. We DO close all transactions. I do NOT reuse transactions. This stuff is as simple as it gets. How the heck CAN anything go wrong here?

Normally, you can take a sql profiler trace to find out why.

Did you actually ever try that? I said "under high load". That server is basically like processing 2000 or so sql statements a SECOND for minutes before that thing slowly starts to materialize. The error does NOT appear under low or medium load. As a matter of fact, I have been unsuccessfull in replicating it in the lab. I get it on one customer's system, and I get it occasionally on one of our hosting systems for one customer (who uses a lot of ressources). It is critical for the one customer with his own system, because I sometimes get 10 or so of those a minute. In both scenarios where the error happens I can not turn on tracing for obvious reasons. And again, in the lab I was not successfull replicating it.

But I simply am totally our of ideas on what causes this. It should just not happen.

|||Did anybody solve this problem ?

High load SqlServer failes throwing error 3926 - what is that?

It manisfests itself in our SqlClient use (i.e. .NET 2.0) on one client side only...

with dozens of messages like:

ASP.global_asax - System.Data.SqlClient.SqlException : Server failed to resume the transaction, desc: 3500000c5b.

The transaction active in this session has been committed or aborted by another session.

That poins to SQL Server error 3926.

But I have NO clue how that comes. Anyone an idea? The code works flawless under dozens of other systems.

This looks like a exception throwed by SQL engine.

Guess what - it is SQL Error 3926 indicated by SQL Server. I already found that out and I already said so.

From "The transaction active in this session has been committed or aborted by another session.", I think more than one session in your application are accessing one transaction.

No chance. Here is the problem. I have, in the complete application, exactly 8 methods that do SQL processing. EVERY ONE of them:

* Gets a connection
* Establishes a transaction
* does it's job
* Closes the transaction
* Closes the connection

There is no open transaction ever left. All conenctions are properly disposed in a finally clause of a try/catch block in the method.

In fact, all my methods look like this:

Start:

IDbConnection connection = GetConnection ();
IDbTransaction txn = null;
if (System.Transactions.Transaction.Current == null) {
txn = connection.BeginTransaction ();
}
try {

processing

} finally {
if (txn == null) {
txn.Rollback ();
txn.Dispose ();
txn = null;
}
if (connection != null) {
connection.Close ();
connection.Dispose ();
connection = null;
}

If an error would happen in the finally block, I would see it. This is the pattern ALL my methods follow. This is the only location I actually open a connection. And I have a total of 8 methods that actually use the GetConnection method - and all run through the same pattern.

That is why I am ripping my hairs out. We DO close all transactions. I do NOT reuse transactions. This stuff is as simple as it gets. How the heck CAN anything go wrong here?

Normally, you can take a sql profiler trace to find out why.

Did you actually ever try that? I said "under high load". That server is basically like processing 2000 or so sql statements a SECOND for minutes before that thing slowly starts to materialize. The error does NOT appear under low or medium load. As a matter of fact, I have been unsuccessfull in replicating it in the lab. I get it on one customer's system, and I get it occasionally on one of our hosting systems for one customer (who uses a lot of ressources). It is critical for the one customer with his own system, because I sometimes get 10 or so of those a minute. In both scenarios where the error happens I can not turn on tracing for obvious reasons. And again, in the lab I was not successfull replicating it.

But I simply am totally our of ideas on what causes this. It should just not happen.

|||Did anybody solve this problem ?
sql

Sunday, February 26, 2012

Hiding URL from User

I have a web application written in ASP, not ASP.Net. We set up a page with an iframe that we populate the SSRS reports into. The url of the report is visible through a right click/properties. Is there a way to either disable the right click or hide the url?

you can disable the right click by adding oncontextmenu="return false" in the body tag:

<body oncontextmenu="return false">

Hiding SOME parameters in the parameter toolbar

I am using the ReportViewer.dll in a ASP.NET web application. The report
being displayed takes 2 parameters. One of these is programmatically set. I
would like the user to select values only for the other parameter. So when
displaying the report within the control, can I just show the second
parameter on the toolbar and hide the first one?
The Parameters toolbar property in the ReportViewer control corresponds to
the 'Parameters' URL access parameter, which hides/displays the entire
parameter toolbar
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?OK I solved the problem...You just type in a blank string for the Prompt
value...
"Aparna" wrote:
> I am using the ReportViewer.dll in a ASP.NET web application. The report
> being displayed takes 2 parameters. One of these is programmatically set. I
> would like the user to select values only for the other parameter. So when
> displaying the report within the control, can I just show the second
> parameter on the toolbar and hide the first one?
> The Parameters toolbar property in the ReportViewer control corresponds to
> the 'Parameters' URL access parameter, which hides/displays the entire
> parameter toolbar
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?|||On Wed, 26 Jan 2005 12:21:03 -0800, Aparna
<Aparna@.discussions.microsoft.com> wrote:
>OK I solved the problem...You just type in a blank string for the Prompt
>value...
>
How exactly does one "type in" a blank string? :)))
>"Aparna" wrote:
>> I am using the ReportViewer.dll in a ASP.NET web application. The report
>> being displayed takes 2 parameters. One of these is programmatically set. I
>> would like the user to select values only for the other parameter. So when
>> displaying the report within the control, can I just show the second
>> parameter on the toolbar and hide the first one?
>> The Parameters toolbar property in the ReportViewer control corresponds to
>> the 'Parameters' URL access parameter, which hides/displays the entire
>> parameter toolbar
>> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?|||haha...Not quite sure...However, it turns out my excitement was in vain...If
the prompt value is not specified, then the paratmeter becomes Read-only..So,
if you programatically want to assign values to it, you are out of luck! The
only way to set the value of that parameter is via the parameter property
page. So my orginal problem still stands...SOMEBODY HELLLP...
"Usenet User" wrote:
> On Wed, 26 Jan 2005 12:21:03 -0800, Aparna
> <Aparna@.discussions.microsoft.com> wrote:
> >OK I solved the problem...You just type in a blank string for the Prompt
> >value...
> >
> How exactly does one "type in" a blank string? :)))
>
> >"Aparna" wrote:
> >
> >> I am using the ReportViewer.dll in a ASP.NET web application. The report
> >> being displayed takes 2 parameters. One of these is programmatically set. I
> >> would like the user to select values only for the other parameter. So when
> >> displaying the report within the control, can I just show the second
> >> parameter on the toolbar and hide the first one?
> >>
> >> The Parameters toolbar property in the ReportViewer control corresponds to
> >> the 'Parameters' URL access parameter, which hides/displays the entire
> >> parameter toolbar
> >> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_urlaccess_959e.asp). Umm, is that bad news?
>

Friday, February 24, 2012

Hiding Parameters

Is it easy to hide the parameters of a report? Im using the ReportViewer tag in asp.net and I have my own parameters that I am passing into my report. But when the report renders, it shows the default parameters that look terrible in my application.

I was wondering if there was a way to only have my own parameters showing?

Thanks in advance everyone
man, just after I posted this I found the exact thing I wanted, the code is as follows:

reportViewer.Parameters = Microsoft.Samples.ReportingServices.ReportViewer.multiState.False;

Hiding parameter passed through query string

I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
ReportViewer control in an ASP.NET page. The reports I link to all require a
sensitive parameter value and I have been passing that through using the
query string. Unfortunately, the entire URL of the report--including the
parameter in the query string--is visible in the source for the page, and I
don't want the user to see this for security purposes.
Is there a way to hide this? I'm open to any and all suggestions.
Thanks,
MarkSearch the group on encryption - use System.Security.Cryptography package
I just repeat myself from a previous posting:
"Parameter's encryption is a key to solve your problem.
The simplest ( but not the only) way is:
1.create your own parameters collection pages (forms).
2. encrypt user input using a permanent or temporary encryption key.
3. Reference encryption assembly in your report designer.
4. use a decryption routine in your custom code akin
"=Code.Library.Decrypt(Parameters!account_id);" by retrieving an encryption
key used in step 2.
By using this approach even a simplest parameter will be totally un
guessable, because even a single digit will be encrypted to something like
"bHZiajB4TGpBdU1"
"
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:98599DF6-C0E8-418A-A573-8293EEE98E13@.microsoft.com...
> I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
> ReportViewer control in an ASP.NET page. The reports I link to all require
> a
> sensitive parameter value and I have been passing that through using the
> query string. Unfortunately, the entire URL of the report--including the
> parameter in the query string--is visible in the source for the page, and
> I
> don't want the user to see this for security purposes.
> Is there a way to hide this? I'm open to any and all suggestions.
> Thanks,
> Mark|||For RS 2000 you can use web services. There is really no way using URL
integration to hide it from the source. You can hide it from the page being
displayed but if they go View, Source they will see it.
In VS 2005 there are two new controls that work with RS 2005. They use web
services under the covers, not URL integration. You do have to have RS 2005.
Note that you can upgrade to RS 2005 while leaving the database at 2000
(that is what I have done). You do need a SQL Server 2005 license for this
however.
My suggestion is if security is important then you use the new controls.
One other option, put the parameters in a database table and then pass the
primary key to the table and have a dataset extracting the parameters.
This does make things more complicated but it is a version independent
solution (if you can convince management to upgrade to RS 2005). Note what I
said about upgrading. Sometimes it is easier to get permission to upgrade
reporting services than it is to upgrade a SQL Server database.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:98599DF6-C0E8-418A-A573-8293EEE98E13@.microsoft.com...
> I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
> ReportViewer control in an ASP.NET page. The reports I link to all require
> a
> sensitive parameter value and I have been passing that through using the
> query string. Unfortunately, the entire URL of the report--including the
> parameter in the query string--is visible in the source for the page, and
> I
> don't want the user to see this for security purposes.
> Is there a way to hide this? I'm open to any and all suggestions.
> Thanks,
> Mark|||Good point. I forgot about doing that.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Oleg Yevteyev" <myfirstname001atgmaildotcom> wrote in message
news:OdtQOZxCGHA.1816@.TK2MSFTNGP11.phx.gbl...
> Search the group on encryption - use System.Security.Cryptography package
> I just repeat myself from a previous posting:
> "Parameter's encryption is a key to solve your problem.
> The simplest ( but not the only) way is:
> 1.create your own parameters collection pages (forms).
> 2. encrypt user input using a permanent or temporary encryption key.
> 3. Reference encryption assembly in your report designer.
> 4. use a decryption routine in your custom code akin
> "=Code.Library.Decrypt(Parameters!account_id);" by retrieving an
> encryption
> key used in step 2.
> By using this approach even a simplest parameter will be totally un
> guessable, because even a single digit will be encrypted to something like
> "bHZiajB4TGpBdU1"
> "
>
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:98599DF6-C0E8-418A-A573-8293EEE98E13@.microsoft.com...
>> I'm using Reporting Servicves for SQL Server 2000 and I've embedded a
>> ReportViewer control in an ASP.NET page. The reports I link to all
>> require a
>> sensitive parameter value and I have been passing that through using the
>> query string. Unfortunately, the entire URL of the report--including the
>> parameter in the query string--is visible in the source for the page, and
>> I
>> don't want the user to see this for security purposes.
>> Is there a way to hide this? I'm open to any and all suggestions.
>> Thanks,
>> Mark
>