Showing posts with label enabled. Show all posts
Showing posts with label enabled. Show all posts

Saturday, March 24, 2012

Exception has been thrown by the target of an invocation.

I have an Atlas enabled asp page working fine in Visual Web Developer 2005.

It has a Web Service with two methods one for an autocomplete and another to generate a datatable to populate a datagrid.

The second method makes calls two methods from a DataSet object.(one gets a row and the other its details.)

When I deploy to produccion the autocomplete works fine but populating the datagrid fails with:

Exception has been thrown by the target of an invocation

thrown by InternetExplorer.

I tested the Web Service calling its operations directly and it works fine.

Please help.

ps. the production machine has low space in C:\ drive.

In both cases I go against the same SQL Server 2000 database.

Since I posted the question above I was able to "deploy" to a Virtual Directory (called "LocalAtlas" situated on D:\VB Projects\VB Web Developer\Atlas Web Virtual Dir\ ) of my Local IIS and after I added the impersonation tag

<

identityimpersonate="true"userName="vvvvvvvv"password="pppppppp"/>

the page worked as expected. However, it is looking for the .asmx file in the same directory where Visual Studio looks.

But changing the KEY tag from

<

addkey="OBWebServiceRef.OBWebService"value="http://localhost:1459/AtlasWebSite1/OBWebService.asmx"/>

as created by Visual Web Dev to

<

addkey="OBWebServiceRef.OBWebService"value="http://localhost/LocalAtlas/OBWebService.asmx"/>

or anything else I can think of (in Web.config) does not work.

(I removed the fileAtlasWebSite1/OBWebService.asmxto avoid using it)

Wednesday, March 21, 2012

Events & Atlas enabled Custom UserControls

I've got a UserControl I use to search for a customer. This UC contains a ScriptManager and an UpdatePanel.

Just for simulation I've created a page containing 2 of my UC's, this generates an error saying :

Only one instance of a ScriptManager can be added to the page.

If I use only 1 UC on the page I'd like to inform the Page that a Customer was selected so I try and raise an (public) event but that results the little error icon on the bottom left corner of IE saying 'error on page' Details: Line:40, char:1 Error:Object expected Code:0URL:http://.../default.aspx

I can imagine that since this selection/postback is done from within an UpdatePanel, the rest of the page cannot be 'reached' by the event and that would cause an error. If I remove the UpdatePanel things work just fine...

What would be a good way for an Atlas enabled UserControl to 'talk' to the page (or UserControl) on wich it is currently begin used.

Regards,

Jurjen.

Hi Jurjen,

To use two UserControls on the same page put the Atlas Script Manager Proxy tag in the Usercontrol insted of ScriptManager tag and add the ScriptManager tag in the page which uses this UserControl. I think this would solve your first problem.

Regarding the second could you please explain in detail what you are doing and what is to be done.

Thanks & Regards,