Tuesday, July 18, 2006

A problem in DCOM when working with Gis-Server on Windows server 2003.

Today Nati(one of my team-mate) and I, tried to install a Gis Application on a server that contain the Gis-Server(one of the ESRI company new product) that use it off course.

The server runs on Windows server 2003, with SP1.

We got this error:

"The application-specific permission settings do not grant Remote Activation permission for the COM Server application with CLSID"

One of the solutions to this problem is to give the "Activation and Launch" privilege to all users in Domain, on the ArcSom application(Trust me its works).

But it's a very bad solution (Security issues...), so I decided to look for a better solution over the net.

After a brief look, I found that this is a known problem, and ERSI even publish a specific patch to give an answer for this bug.

Finally I understood the problem: In the SP1 Windows Server 2003, Microsoft implement new DCOM communication restrictions that prevent users from launching or activating remote COM servers unless explicitly granted permission to do so. The ArcSOM process is a COM server and as such, must be configured to grant remote launch and activation privileges to users in the agsadmin and agsusers groups.

By the way, I think that ESRI patch works very similar to the "bad" solution, but I hope that they found a better solution.

Sending string in xmlhttp in correct string encoding format

Sending string in xmlhttp in a correct character encoding format

Yesterday, we (Shani – one of my team-mate, and I) had a strange problem in character encoding format.

We tried to transfer an xml (string in xml format not the XmlDocument Object) from client side to server side by xmlhttp object, and that xml contained a Hebrew characters.

When the xml arrived to the server side we took the string from the Request object in array of bytes format, then we built a string from this array, and loaded it to an xml object (XmlDocument class).

Then, in the xml property of this object we saw that the xml contain a gibberish in the Hebrew text (probably wrong string encoding format). I tried to add the xml header with the correct encoding declaration, and then to load it to an xml object, but it didn't work.

After a lot of thinking and searching I found the mistake.

I always look on the xml after I convert it from array of bytes to string, and only after I create the all string, I tried to change the string's encoding.

I found that maybe I needed to change the encoding in the beginning of the process, and then use the class System.Text.Encoding.

In this class I found a method that gets strings from array of bytes in UT8-8

encoding (8-bit Unicode Transformation Format).

And everything worked perfect, so next time you will want to send a string in "special" encoding format and to get the same string(in the same encoding format), you should use this method…

Example:



Thursday, July 06, 2006

Make a basic CallBack functionality (using XmlHttp object)

Hi,
It's so easy to implement a basic call back functionality (in asynchronous xmlhttp method) and to use it in your web pages(One of the Ajax implementation).
You just need to use XmlHttp object and to wrap the code with some java script function.

For example:
Code for client side:


And for server side:

And that's all, you have a basic CallBack functionality!



My new blog

Hi my name is avi wortzel.
I'm working in a big computer company, as a team leader.
I'll write here about a lot of things:

  • .Net
  • C#
  • Asp.net
  • Com+
  • Gis(ESRI Software)
  • Mangement
  • Analysis & Design
  • Life
  • Trips
  • And more...

I really hope that you will visit my blog, write me feedback, give me some advices or just read my posts.