473,722 Members | 2,484 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft Application Blocks and Medium Trust??


I'm upgrading a VS 2003/.Net 1.1 ASP.Net application to VS 2008/.Net 3.0

The application uses an older version of the Microsoft Data Blocks for
database access. The version in the Microsoft.Appli cationBlocks.Da ta.dll
is 2.0

The call to SqlConnection.O pen() fails after I upgrade to .Net 3.0
The application runs under a tweaked version of Medium trust. After the
upgrade and the call to .Open() fails if I change the trust to Full the
call works.

Do I need to upgrade the version of the Application Blocks we are using
or is there a way to get this older version to run under medium trust in
..Net 3.0??

The call works in .Net 1.1 medium trust
The call works in .Net 3.0 full trust
It fails with .Net 3.0 medium trust

thanks
mike
Aug 29 '08 #1
5 2342

Moving up to EnterpriseLibra ry 4.0 is probably the next logical step.

But I think its strange you're getting the issue in the .Data DAAB.

...

Wait, are you one 3.0 or 3.5? It's either EnterpriseLibra ry 3.1 or 4.0. I
don't know if you're in VS2008 but youre using 3.0 compatability.

...

"Michael Howes" <Mi***********@ cdph.ca.govwrot e in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>
I'm upgrading a VS 2003/.Net 1.1 ASP.Net application to VS 2008/.Net 3.0

The application uses an older version of the Microsoft Data Blocks for
database access. The version in the Microsoft.Appli cationBlocks.Da ta.dll
is 2.0

The call to SqlConnection.O pen() fails after I upgrade to .Net 3.0
The application runs under a tweaked version of Medium trust. After the
upgrade and the call to .Open() fails if I change the trust to Full the
call works.

Do I need to upgrade the version of the Application Blocks we are using or
is there a way to get this older version to run under medium trust in .Net
3.0??

The call works in .Net 1.1 medium trust
The call works in .Net 3.0 full trust
It fails with .Net 3.0 medium trust

thanks
mike

Aug 29 '08 #2
Moving up to EnterpriseLibra ry 4.0 is probably the next logical step.
This gets more complicated.
I don't know where the Microsoft.Appli cationBlocks.Da ta.dll comes
from. It's just in a bin folder in the project.
I think it came from "Enterprise Library for .NET Framwork 2.0 -
January 2006".

I just installed "Enterprise Library May 2007" which I think is
version 3.1. After install I did not fine a dll called
Microsoft.Appli cationBlocks.Da ta.dll
>
But I think its strange you're getting the issue in the .Data DAAB.
I don't understand the problem either. I do know that if I make the
call to SqlConnection.O pen() it fails (after upgrading to .NET Framework
3.0) in Medium trust and works if I change to Full trust.
..

Wait, are you one 3.0 or 3.5? It's either EnterpriseLibra ry 3.1 or 4.0. I
don't know if you're in VS2008 but youre using 3.0 compatability.
I'm building (upgrading to) .NET Framework 3.0
I think the version of the enterprise library is "Enterprise Library
for .NET Framwork 2.0 - January 2006" which is *before* 3.1

But as I just mentioned I just installed EnterpriseLibra ry 3.1 and
don't see the dll we are using.

any help appreciated
mike
Aug 29 '08 #3

This example uses the DAAB 2.0.
http://sholliday.space s.live.com/blog/cns!A68482B9628 A842A!139.entry

This example
http://sholliday.space s.live.com/blog/cns!A68482B9628 A842A!176.entry
uses the EnterpriseLibra ry 3.1.
Dll Name?
Microsoft.Appli cationBlocks.Da ta.dll is a compiled version of the DAAB 2.0.
(Pre EnterpriseLibra ry)
//Quote//After install I did not fine a dll called
Microsoft.Appli cationBlocks.Da ta.dll//Quote//
That is correct.
Microsoft.Pract ices.Enterprise Library.Data.dl l will be the new one.

This is not a super trivial upgrade. The syntax is different. Use the
projects above to figure that out.
The issue is that you need to pay this price to get at the right level of
Enterprise Library for VS2008.
With the 2 projects, you can see a DAAB 2.0 version (for 1.1 code) and a
(upgraded newer version) of the EnterpriseLibra ry with a VS2005 (2.0/3.0)
code.

That's alot better than nothing.
The EnterpriseLibra ry is much more mature. And deals with the security
issues alot better.
You basically need to view the DAAB as a deprecated library, since its been
superceded by EnterpriseLibra ry.
..........

Have a good weekend, I'm out.

"Michael Howes" <Mi***********@ cdph.ca.govwrot e in message
news:48******** ******@cdph.ca. gov...
>
>Moving up to EnterpriseLibra ry 4.0 is probably the next logical step.

This gets more complicated.
I don't know where the Microsoft.Appli cationBlocks.Da ta.dll comes from.
It's just in a bin folder in the project.
I think it came from "Enterprise Library for .NET Framwork 2.0 - January
2006".

I just installed "Enterprise Library May 2007" which I think is version
3.1. After install I did not fine a dll called
Microsoft.Appli cationBlocks.Da ta.dll
>>
But I think its strange you're getting the issue in the .Data DAAB.

I don't understand the problem either. I do know that if I make the call
to SqlConnection.O pen() it fails (after upgrading to .NET Framework 3.0)
in Medium trust and works if I change to Full trust.
>..

Wait, are you one 3.0 or 3.5? It's either EnterpriseLibra ry 3.1 or 4.0.
I don't know if you're in VS2008 but youre using 3.0 compatability.
I'm building (upgrading to) .NET Framework 3.0
I think the version of the enterprise library is "Enterprise Library for
.NET Framwork 2.0 - January 2006" which is *before* 3.1

But as I just mentioned I just installed EnterpriseLibra ry 3.1 and don't
see the dll we are using.

any help appreciated
mike

Aug 29 '08 #4
This example uses the DAAB 2.0.
http://sholliday.space s.live.com/blog/cns!A68482B9628 A842A!139.entry

This example
http://sholliday.space s.live.com/blog/cns!A68482B9628 A842A!176.entry
uses the EnterpriseLibra ry 3.1.
This is not a super trivial upgrade. The syntax is different. Use the
projects above to figure that out.
thanks!

it looks after a quick 15 minute glance that the old SqlHelper class
has been mostly replaced by the Database class. If that's true, I have a
lot of work ahead of me.
a lot of the calls look similar, PrepareCommand, ExecuteReader, etc

mike
Aug 29 '08 #5
You don't see what you're looking for because the structure of Enterprise
Library has changed. I strongly recommend you take some time to read the
part of their documentation that deals with Data Access.

Also, if you're using Visual Studio 2008, why _not_ use .NET 3.5 features
where they are useful? Neither .NET 3.0 nor .NET 3.5 make any changes to
..NET 2.0 code - they only add features. You will still be running the 2.0
CLR in either case, so why not get current?

--
John Saunders | MVP - Connected System Developer
Aug 30 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

182
7529
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
3
1512
by: Aahz | last post by:
I have asp.net 1.1 web site with two controls downloaded from internet (obout slide menu and webcharts), which runs fine on the old server. Few days ago my hosting provider sent me on new server with restricted trust policy (medium trust). Since that I cannot configure my web.config to run !!! I have noticed that two controls mentioned above create problem (when I remove them it works fine , without editing web.config at all ). Can...
0
1259
by: Michael Howes | last post by:
I have a webservice and use WSE so a user can upload a good sized file. The entire ASP.Net projects, web.config sets a Medium trust level IIS is set up to use "Integrated Windows authentication" I get an access denied msg in the client when trying to call the webservice method. If I change the trust level in the web.config to Full everything works fine. Because of things beyond my control the ASP.Net app has to run with Medium
4
1933
by: Mukesh | last post by:
Hi I m using microsoft application blocks Enterprise Library june 2005 with .net framework 1.1 and VStudio2003 And C# as coding language Sql server 2000 database the project is running properly on the localhost server but my online server does not have the ms Ent lib installed and also de\oes not have visual studio that simply a .net 1.1 installed on that.
3
1734
by: Mukesh | last post by:
Thx Sloan for the solution. It is working properly under Full trust When i tried it under Medium trust it was giving error Parser Error Message: Required permissions cannot be acquired. :::::::::: Source Error:
0
1112
by: AmitKu | last post by:
I am trying to do a URL post using HttpWebRequest, but it fails because I am hosting on Network Solutions, and their servers are all medium trust. Apparently HttpWebRequest doesn't work on medium trust. Is there any way to do URL posting in a medium trust environment? I'm hoping I don't need to switch hosts because of this. Thanks in advance, Amit
0
890
by: AmitKu | last post by:
I am trying to do a URL post using HttpWebRequest, but it fails because I am hosting on Network Solutions, and their servers are all medium trust. Apparently HttpWebRequest doesn't work on medium trust. Is there any way to do URL posting in a medium trust environment? I'm hoping I don't need to switch hosts because of this. Thanks in advance, Amit
7
2250
by: AmitKu | last post by:
I am trying to do a URL post using HttpWebRequest, but it fails because I am hosting on Network Solutions, and their servers are all medium trust. Apparently HttpWebRequest doesn't work on medium trust. Is there any way to do URL posting in a medium trust environment? I'm hoping I don't need to switch hosts because of this. Btw I've posted this a 3rd time now because I've yet to receive any replies whatsoever. I've called around...
1
1604
by: Jordan M. | last post by:
Hi, Hopefully someone can help or at least point me in the right direction... I have developed a site that uses the CyberSource system to process credit cards. All works great locally on my dev. computer. When I upload to my main server (Shared Hosting, setup with Medium Trust), I get an error that says "That assembly does not allow partially trusted callers.".
0
8863
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9238
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.