Hi,

Looks like the permissions are failing... that means the class where you are
using this dll doesn't have permissions to execute the dll..

Hope you are asserting it in the following way..

str emailAddressFilter =
@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
    System.Text.RegularExpressions.Regex regEx; //These are CLR classes..
    System.Text.RegularExpressions.Match regMatch;
    InteropPermission permission = new
InteropPermission(InteropKind::ClrInterop);
    boolean retVal;
    permission.assert();
    //BP Deviation documented
    regEx = new System.Text.RegularExpressions.Regex(emailAddressFilter);
Where have you registered the dll on the client side or the server side..
and request you to check where the caller method is running, on the client
side or server side...

Regards,
Sumit
On Fri, Mar 6, 2009 at 9:52 AM, anamika_singh.2001 <
anamika_singh.2...@yahoo.com> wrote:

>   Hi,
>
> I tried to call this dll and its function by assert the permissions first,
> using the interOpPermission.
> And while using InteropKind as DLLInterop, it throws error:
>
> Message (09:44:25)
> Request for the permission of type 'InteropPermission' failed.
> (S)\Classes\InteropPermission\demand
> (S)\Classes\CLRInterop\getObjectForAnyType
> (S)\Classes\CurrencyConvert\run - line 16
> (S)\Classes\CurrencyConvert\main - line 8
>
> And while using InteropKind as CLRInterop, it throws error:
> InteropKind as DLLInterop, it throws error:
> > > Clr object is not initialized.
> > > Object 'CLRObject' could not be created.
>
> Can you know why this problem happens? and What would be the possible
> solution for this scenario?
>
> Thanks...
>
> --- In 
> Axapta-Knowledge-Village@yahoogroups.com<Axapta-Knowledge-Village%40yahoogroups.com>,
> Sumit Loya <loya.su...@...> wrote:
> >
> > Hi,
> >
> > You will have to assert the permissions first using the InterOpPermission
> > class and InteropKind as DLLInterop.
> >
> > Otherwise the class will not be initialized.
> >
> > Regards,
> > Sumit
> >
> > On Thu, Mar 5, 2009 at 3:05 PM, anamika_singh.2001 <
> > anamika_singh.2...@...> wrote:
> >
> > > Hi,
> > >
> > > How to resolve the following error?
> > >
> > > Clr object is not initialized.
> > > Object 'CLRObject' could not be created.
> > >
> > > My scenario:
> > >
> > > I created a dll and added this dll to AX client's bin directory, then
> > > Iadded this dll to AOT references.
> > > I tried to call this dll and its functions in class it throws an above
> > > described error.
> > >
> > > Can you know why this problem happens? and
> > > What would be the possible solution for this scenario?
> > >
> > > Thanks...
> > >
> > >
> > >
> >
>
>  
>

Reply via email to