mirsaeedi / SQLCLR-Jalali-Date-Utility

Includes several functions to make it easier for you to work with Persian dates in SQL Server (2005+)
Apache License 2.0
22 stars 9 forks source link

متن کامل ارور وقتی فایل تستی که خودتون گذاشتین رو اجرا میکنم #1

Closed donmoderato closed 5 years ago

donmoderato commented 5 years ago

Msg 10314, Level 16, State 11, Line 1 An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly 'sqlclr.jalalidateutility, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) System.IO.FileLoadException: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString)

mirsaeedi commented 5 years ago

Would you please report the SQL Server version you are using?

donmoderato commented 5 years ago

Yes,sql server 2012

On Sun, 23 Jun 2019, 10:02 Ehsan Mirsaeedi, notifications@github.com wrote:

Would you please report the SQL Server version you are using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mirsaeedi/SQLCLR-Jalali-Date-Utility/issues/1?email_source=notifications&email_token=AFMHMDIIDHFQDZUDS7QP2JTP34DIPA5CNFSM4H2YEAO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKXBEA#issuecomment-504721552, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMHMDIBDRZO5CUZE3MWPXLP34DIPANCNFSM4H2YEAOQ .

donmoderato commented 5 years ago

Hello,do you find any reason?please help me

On Sun, 23 Jun 2019, 10:10 Mohamad Nejaty, donmoderato2015@gmail.com wrote:

Yes,sql server 2012

On Sun, 23 Jun 2019, 10:02 Ehsan Mirsaeedi, notifications@github.com wrote:

Would you please report the SQL Server version you are using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mirsaeedi/SQLCLR-Jalali-Date-Utility/issues/1?email_source=notifications&email_token=AFMHMDIIDHFQDZUDS7QP2JTP34DIPA5CNFSM4H2YEAO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKXBEA#issuecomment-504721552, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMHMDIBDRZO5CUZE3MWPXLP34DIPANCNFSM4H2YEAOQ .

donmoderato commented 5 years ago

Hi Mr Mirsaeedi Would you please help me,i prefer to use your function.

mirsaeedi commented 5 years ago

@donmoderato I'm working on the problem. I reach you back by tomorrow.

mirsaeedi commented 5 years ago

based on my investigation, the error you get has nothing to do with "SQLCLR-Jalali-Date" itself. You could find the solution on Google or stackoverflow, if you searched for the error.

Have a look at this or other similar articles that have provided a solution for the exact error.

Possibly, just running the following script could do the fix.

ALTER DATABASE MyDatabaseName SET TRUSTWORTHY ON
donmoderato commented 5 years ago

I didn't find any solution for this problem,unfortunately.

mirsaeedi commented 5 years ago

Did you try to turn on the TRUSTWORTHY on your database?

donmoderato commented 5 years ago

Yes,but the error didn't obviate

On Tue, 25 Jun 2019, 23:58 Ehsan Mirsaeedi, notifications@github.com wrote:

Did you try to turn on the TRUSTWORTHY on your database?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mirsaeedi/SQLCLR-Jalali-Date-Utility/issues/1?email_source=notifications&email_token=AFMHMDMJBEQ3VRVAXOU4F7TP4JWXNA5CNFSM4H2YEAO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYRKXYA#issuecomment-505588704, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMHMDOTGZ4YQS6WRDCO3UDP4JWXNANCNFSM4H2YEAOQ .

donmoderato commented 5 years ago

The closer things that i found was this https://www.google.com/url?sa=t&source=web&rct=j&url=https://support.microsoft.com/hr-ba/help/949080/error-message-when-you-execute-a-clr-routine-or-use-an-assembly-in-sql&ved=2ahUKEwiMnIiVpoTjAhXOCOwKHeh5BUkQFjABegQIBhAJ&usg=AOvVaw2xr0vpxYbYQ02EiPTkEugs&cshid=1561492499736

But i didn't reach any result,would you plesse tell me what do you get?

On Wed, 26 Jun 2019, 00:16 Mohamad Nejaty, donmoderato2015@gmail.com wrote:

Yes,but the error didn't obviate

On Tue, 25 Jun 2019, 23:58 Ehsan Mirsaeedi, notifications@github.com wrote:

Did you try to turn on the TRUSTWORTHY on your database?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mirsaeedi/SQLCLR-Jalali-Date-Utility/issues/1?email_source=notifications&email_token=AFMHMDMJBEQ3VRVAXOU4F7TP4JWXNA5CNFSM4H2YEAO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYRKXYA#issuecomment-505588704, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMHMDOTGZ4YQS6WRDCO3UDP4JWXNANCNFSM4H2YEAOQ .