Wednesday, March 7, 2012
File System Access With Custom Assembly Method
I am building a dashboard report that will read through the file system
for a record's document folder on our server and report to the user if
there are any files missing in the directory. I am using a custom
assembly to house the method. When using the assembly in the dev
environment, everything works just fine. When the report is deployed
to the server, the assembly seems to work fine, but on closer
inspection, it looks like I cannot read the file system. Can someone
point me to a link that can bypass this (safely)? Do I need to suck it
up and create an ASP.NET app that does the same thing?
Thanks
JeffHi Jeff.
You need to change the "rssrvpolicy.config" to permit file access to your
assembly. In Visual Studio you have all permissions, but running on the
report server permission checks is performed.
In "rssrvpolicy.config" you can see several codegroups giving other
assemblies certain permissions. The file is found in "%SQL
SERVER%\MSSQL\Reporting Services\ReportServer"
You can put you CodeGroup below the one ending with Url="$CodeGen$/*". Se
sample:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCodeGroup"
Description="Code group for my assembly">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\MyAssembly.MyNamespace.MyClass.dll"
/>
</CodeGroup>
This way you give you assemmbly Full thrust. To limit persmission to file
access you can change PermissionSet to "FileIOPermission".
Kind regards
Martin Bring (Sogeti AB)
*****************
"jeffjones176@.gmail.com" wrote:
> Hello All,
> I am building a dashboard report that will read through the file system
> for a record's document folder on our server and report to the user if
> there are any files missing in the directory. I am using a custom
> assembly to house the method. When using the assembly in the dev
> environment, everything works just fine. When the report is deployed
> to the server, the assembly seems to work fine, but on closer
> inspection, it looks like I cannot read the file system. Can someone
> point me to a link that can bypass this (safely)? Do I need to suck it
> up and create an ASP.NET app that does the same thing?
> Thanks
> Jeff
>
Sunday, February 26, 2012
File Protection
I'm building a VB.NET application using an MSDE database. I'm working on an
install program for the app, and I'm running into an error with the MSDE
install.
I'm installing MSDE by executing the MSDE setup:
setup.exe INSTANCENAME="test601" BLANKSAPWD=1
DATADIR="d:\data\test601\Data\" TARGETDIR="d:\data\test601\"
DISABLENETWORKPROTOCOLS=0 SECURITYMODE=SQL /L*v
"d:\data\test601\MSDE601.log"
The install works without error on my WinXP Pro development machine. But I
get a Windows File Protection error on a 'fresh' WinXP Home computer.
I create the WinXP Home environment by installing WinXP Home from the MSDN
DVDs and then applying all of the Windows Updates from the MS site (except
for SP2; I'll test that one separately). I then install MSDE by running the
above setup, and I get the following Windows File Protection error:
"Files that are required for Windows to run properly have been replaced by
unrecognized versions. To maintain system stability, Windows must restore
the original versions of these files. Insert your Windows XP Home Edition
CD-ROM now."
How can I prevent this error message from appearing? (MSDE appears to have
installed fine, other than displaying this error.) Or, perhaps more
importantly, how can I install MSDE in a way that does not threaten "system
stability?"
Thanks for your help.
- Jeff
A have the some problem.
Your sistem is hacked by a virus.
"Jeff" <jeff_nospam@.eNetPortals.com> wrote in message news:uNrgd.13498$ta5.4810@.newsread3.news.atl.earth link.net...
Hi -
I'm building a VB.NET application using an MSDE database. I'm working on an
install program for the app, and I'm running into an error with the MSDE
install.
I'm installing MSDE by executing the MSDE setup:
setup.exe INSTANCENAME="test601" BLANKSAPWD=1
DATADIR="d:\data\test601\Data\" TARGETDIR="d:\data\test601\"
DISABLENETWORKPROTOCOLS=0 SECURITYMODE=SQL /L*v
"d:\data\test601\MSDE601.log"
The install works without error on my WinXP Pro development machine. But I
get a Windows File Protection error on a 'fresh' WinXP Home computer.
I create the WinXP Home environment by installing WinXP Home from the MSDN
DVDs and then applying all of the Windows Updates from the MS site (except
for SP2; I'll test that one separately). I then install MSDE by running the
above setup, and I get the following Windows File Protection error:
"Files that are required for Windows to run properly have been replaced by
unrecognized versions. To maintain system stability, Windows must restore
the original versions of these files. Insert your Windows XP Home Edition
CD-ROM now."
How can I prevent this error message from appearing? (MSDE appears to have
installed fine, other than displaying this error.) Or, perhaps more
importantly, how can I install MSDE in a way that does not threaten "system
stability?"
Thanks for your help.
- Jeff
|||Thanks for your response -
While it may be true that a virus was at work here, I was able to get a
different cause ("known issue") from MS (see below). Just curious: what
virus did your computer have?
- Jeff
Response from MS:
I found that it turned out to be a known issue in MSDE setup or SP3a Setup
that File Protection will pop-up . The root cause is the protected system
file sqlunirl.dll was not restored to its original, valid version because
the Windows File Protection restoration process was cancelled by user
interaction. However on computers with Windows XP SP1 if the dllcache
folder is missing or the contents of the dllcache are empty, then you might
still get the pop-ups even with sp3a.
First of all, upgrade your Windows XP to the latest MDAC 2.8
Microsoft Data Access Components (MDAC) 2.8
http://www.microsoft.com/downloads/d...fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Secondly, if above doesn't work, the workaround for this issue is
1. First manually run the dahotfix.exe, which will install/copy the correct
copy of SQLUNIRL.DLL (2000.80.728.0) into the dllcache. (I got the
dahotfix.exe from the sqlredis.exe that ships with SQL2KSP3 in the
x86\other folder. Just right click on this sqlredis.exe and extract the exe
to a local folder. This will give you mdac_qfe.exe. Then again, right click
on mdac_qfe.exe and extract the contents of this exe into another local sub
folder. This should give you a dahotfix.exe)
2. Then run the setup, which should complete successfully with no errors.
"news.microsoft.com" <x> wrote in message
news:uqpxmFdzEHA.2716@.TK2MSFTNGP14.phx.gbl...
A have the some problem.
Your sistem is hacked by a virus.
"Jeff" <jeff_nospam@.eNetPortals.com> wrote in message
news:uNrgd.13498$ta5.4810@.newsread3.news.atl.earth link.net...
Hi -
I'm building a VB.NET application using an MSDE database. I'm working on an
install program for the app, and I'm running into an error with the MSDE
install.
I'm installing MSDE by executing the MSDE setup:
setup.exe INSTANCENAME="test601" BLANKSAPWD=1
DATADIR="d:\data\test601\Data\" TARGETDIR="d:\data\test601\"
DISABLENETWORKPROTOCOLS=0 SECURITYMODE=SQL /L*v
"d:\data\test601\MSDE601.log"
The install works without error on my WinXP Pro development machine. But I
get a Windows File Protection error on a 'fresh' WinXP Home computer.
I create the WinXP Home environment by installing WinXP Home from the MSDN
DVDs and then applying all of the Windows Updates from the MS site (except
for SP2; I'll test that one separately). I then install MSDE by running the
above setup, and I get the following Windows File Protection error:
"Files that are required for Windows to run properly have been replaced by
unrecognized versions. To maintain system stability, Windows must restore
the original versions of these files. Insert your Windows XP Home Edition
CD-ROM now."
How can I prevent this error message from appearing? (MSDE appears to have
installed fine, other than displaying this error.) Or, perhaps more
importantly, how can I install MSDE in a way that does not threaten "system
stability?"
Thanks for your help.
- Jeff
Sunday, February 19, 2012
File Groups for table partitioning and storage
Hello,
I am building partitiong tables, partitioning on different file groups:
the question is:
Partitioned table referred to old data that are not frequent accessed for reporting can be stored on separate location(External storage, tape and so on) or to make partitioning functioning must all file groups must be presents?
If not, how can I separate old data from current ones (still using partitioning) to reduce the size of DB?
What it is the best for storage data and easy to access it when needs arise (eg reporting): Tape, external storage, others?
Thank
SQL doesn't support moving the data to tape. There are two ways to look at the partitioning.
1. I need way more disk performance than a single RAID array will give me. You would therefor partition the table over several high speed disk arrays.
2. We have old data that isn't accessed all that often any more, and high performance isn't needed for the old data. You would therefor parititon the table with the new data on high speed disks, and the old data on slower, less expensive disks.
The database size won't get any smaller, but the storage costs will be reduced.