Monday, March 26, 2012
Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
with SQL Server and I get problem with method Fill() for which when
running ends with System Error even with the most simple cases which I
copied from a tutorial. everything else works right for ex Preview Data
except for example sqlDataAdapter1.Fill(ds1).
Is it a bug or some other kind of error. What should I do?
Dalius
Fill() problem in VS .NET 2003 in Windows application C# with SQL ServerI get :
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.
"Auto" <dalius@.autocentras.com> wrote in message
news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
> I starting to use Visual Studio .NET 2003 creating C# Windows application
> with SQL Server and I get problem with method Fill() for which when
> running ends with System Error even with the most simple cases which I
> copied from a tutorial. everything else works right for ex Preview Data
> except for example sqlDataAdapter1.Fill(ds1).
> Is it a bug or some other kind of error. What should I do?
> Dalius
> Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
>
>|||Post your code... The fill method does work, so I suspect you are doing
something funny... It might be a better place to post it in the dot net
groups, but Either place will do.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred
> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
> > I starting to use Visual Studio .NET 2003 creating C# Windows
application
> > with SQL Server and I get problem with method Fill() for which
when
> > running ends with System Error even with the most simple cases which I
> > copied from a tutorial. everything else works right for ex Preview
Data
> > except for example sqlDataAdapter1.Fill(ds1).
> >
> > Is it a bug or some other kind of error. What should I do?
> >
> > Dalius
> >
> > Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
> >
> >
> >
>|||Try executing the statement in a try/catch block so that you can get more
detailed info on the error:
try
{
Fill();
}
catch ( SqlException ex )
{
MessageBox.Show(ex.ToString());
}
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred
> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
> > I starting to use Visual Studio .NET 2003 creating C# Windows
application
> > with SQL Server and I get problem with method Fill() for which
when
> > running ends with System Error even with the most simple cases which I
> > copied from a tutorial. everything else works right for ex Preview
Data
> > except for example sqlDataAdapter1.Fill(ds1).
> >
> > Is it a bug or some other kind of error. What should I do?
> >
> > Dalius
> >
> > Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
> >
> >
> >
>sql
Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
with SQL Server and I get problem with method Fill() for which when
running ends with System Error even with the most simple cases which I
copied from a tutorial. everything else works right for ex Preview Data
except for example sqlDataAdapter1.Fill(ds1).
Is it a bug or some other kind of error. What should I do?
Dalius
Fill() problem in VS .NET 2003 in Windows application C# with SQL ServerI get :
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.
"Auto" <dalius@.autocentras.com> wrote in message
news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
quote:|||Post your code... The fill method does work, so I suspect you are doing
> I starting to use Visual Studio .NET 2003 creating C# Windows application
> with SQL Server and I get problem with method Fill() for which when
> running ends with System Error even with the most simple cases which I
> copied from a tutorial. everything else works right for ex Preview Data
> except for example sqlDataAdapter1.Fill(ds1).
> Is it a bug or some other kind of error. What should I do?
> Dalius
> Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
>
>
something funny... It might be a better place to post it in the dot net
groups, but Either place will do.
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
quote:
> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred
quote:|||Try executing the statement in a try/catch block so that you can get more
> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
application[QUOTE]
when[QUOTE]
Data[QUOTE]
>
detailed info on the error:
try
{
Fill();
}
catch ( SqlException ex )
{
MessageBox.Show(ex.ToString());
}
Hope this helps.
Dan Guzman
SQL Server MVP
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
quote:
> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred
quote:
> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
application[QUOTE]
when[QUOTE]
Data[QUOTE]
>
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 Share Delivery Failing
Failure writing file Test.pdf : A logon error occurred when attempting to access the file share. The user account or password is not valid.
An in ReportServerService<dateTime>.log, I find the following error:
ReportingServicesService!library!10!08/22/2007-16:17:08:: e ERROR: Throwing Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid., A logon error occurred when attempting to access the file share. The user account or password is not valid.;
Info: Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid. > System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at RSRemoteRpcClient.RemoteLogon.GetRemoteImpToken(String pRPCEndpointName, Int32 type, Guid dataSourceId, String pUserName, String pDomain, String pPassword)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
End of inner exception stack trace
ReportingServicesService!subscription!10!08/22/2007-16:17:08:: Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid. > System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at RSRemoteRpcClient.RemoteLogon.GetRemoteImpToken(String pRPCEndpointName, Int32 type, Guid dataSourceId, String pUserName, String pDomain, String pPassword)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
End of inner exception stack trace
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData d)
ReportingServicesService!subscription!10!08/22/2007-16:17:08:: i INFO: Error writing file Test.pdf to path \\mrhowell\SYS\junk\josh
I have tried using the <domain>\<user> username syntax. I have tried sending to multiple different machines. The only deployment that succeeded was to \\localhost\c$\test with administrator credentials entered into the Subscription (unacceptable, of course).
I've seen this issue raised on this forum at least twice, and neither was met with any ideas or answers. Has anyone encountered and overcome this issue?
I'm having the exact same issue...if you get any sort of response please let me know.
|||Are you using the development edition? I think you can only use localhost on that.
File Share Delivery Failing
Failure writing file Test.pdf : A logon error occurred when attempting to access the file share. The user account or password is not valid.
An in ReportServerService<dateTime>.log, I find the following error:
ReportingServicesService!library!10!08/22/2007-16:17:08:: e ERROR: Throwing Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid., A logon error occurred when attempting to access the file share. The user account or password is not valid.;
Info: Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid. > System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at RSRemoteRpcClient.RemoteLogon.GetRemoteImpToken(String pRPCEndpointName, Int32 type, Guid dataSourceId, String pUserName, String pDomain, String pPassword)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
End of inner exception stack trace
ReportingServicesService!subscription!10!08/22/2007-16:17:08:: Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider+NetworkErrorException: A logon error occurred when attempting to access the file share. The user account or password is not valid. > System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at RSRemoteRpcClient.RemoteLogon.GetRemoteImpToken(String pRPCEndpointName, Int32 type, Guid dataSourceId, String pUserName, String pDomain, String pPassword)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
End of inner exception stack trace
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.GetImpersonationToken(String userName, String domain, String userPwd)
at Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData d)
ReportingServicesService!subscription!10!08/22/2007-16:17:08:: i INFO: Error writing file Test.pdf to path \\mrhowell\SYS\junk\josh
I have tried using the <domain>\<user> username syntax. I have tried sending to multiple different machines. The only deployment that succeeded was to \\localhost\c$\test with administrator credentials entered into the Subscription (unacceptable, of course).
I've seen this issue raised on this forum at least twice, and neither was met with any ideas or answers. Has anyone encountered and overcome this issue?
I'm having the exact same issue...if you get any sort of response please let me know.