[mapguide-users] InitializeWebTier

Jackie Ng jackie.ng at aecsystems.com.au
Thu Feb 28 02:06:31 EST 2008


I don't know what version or edition of Visual Studio you are using, but the
procedure for Visual Studio 2005 (non-Express) is.

If your project is an asp.net web application

1. Right click your asp.net project, select properties
2. Go to the "Web" tab and choose "Use IIS Web Server", create or map your
project url. 
3. Save the project.

If your project is an asp.net web site

1. Run IIS web services manager (Start->Run type "inetmgr")
2. Right click the Default web site and choose (New -> Virtual Directory)
3. Give an alias. Click next.
4. Point the directory to the directory of your asp.net web site. Click
next.
5. Click next.
6. Right click the newly created virtual directory. Choose Properties.
7. Go to the asp.net tab, make sure the version is 2.0.xxxxx
8. Now right click your web site project in Visual Studio, choose Property
Pages
9. Under the "Start Options" sections. Choose "Use custom server", for the
"Base URL" enter the URL of the virtual directory you just created.
10. Save the project.

That should then kickstart IIS instead of the built-in webserver. Remember
to copy all the dlls from the mapviewernet/bin directory into the bin
directory of your asp.net application. Referencing MapGuideDotNetApi.dll in
your project is *not enough*.

- Jackie


swetha1 wrote:
> 
> Hi,
> 
> Well i am running the application with Visual Studio built in
> WebServer.....How do i change the WebServer??? And Regarding the folder
> have prepared it in the www folder.... So may be the webserver is creating
> the problem.... Can you please send me the code and help me out in how to
> change the WebServer.....I am new user to both Visual Studio and Mapguide
> OpenSource..... And have a submission in 2 days.... Please
> 
> Thanks for your help in advance
> 
> 
> 
> 
> Jackie Ng wrote:
>> 
>> InitializeWebTier() is defined in the utilityfunctions.aspx that you
>> omitted from inclusion.
>> 
>> The reason you are getting errors in are probably because of:
>> 
>> - You are using frames (evil, but unavoidable since that's how the AJAX
>> viewer was designed). Visual Studio has no designer support for
>> frames/framesets and can throw false errors, and most of the time these
>> are non-fatal validation errors becuase you are validating a frameset
>> document with a non-frameset doctype.
>> 
>> - You are probably running your asp.net application with Visual Studio's
>> built in webserver (Cassini), this will NOT WORK because it requires
>> access to the mapviewernet and mapagent directories that Cassini does not
>> and will not know about. You must configure your project to launch in
>> IIS.
>> 
>> - All the sample code is inline like classic asp, which goes against the
>> common asp.net code-behind model, making it hard to "copy and paste" to
>> your asp.net projects.
>> 
>> - The dotnetviewersample was done with the expectation that it is to be
>> deployed in the www folder of your MGOS installation (because it is
>> hardcoded to look for webconfig.ini in that folder). If you have copied
>> the dotnetviewersample, file-by-file, line-by-line it will probably fail
>> if it is not inside the www folder.
>> 
>> So my recommendation is:
>> 
>> - Put your code in a folder inside MapGuide's www directory.
>> - Put that include utilityfunctions.aspx line back in.
>> - Ignore any non-compliation errors Visual Studio throws at you.
>> 
>> Hope that helps.
>> 
>> - Jackie
>> 
>> 
>> swetha1 wrote:
>>> 
>>> Hi,
>>> 
>>> I am trying to open this dotnetviewersample in Visual studio, It is
>>> giving an error in the utilityfunction.aspx....so i created my own
>>> project where in i pasted the code from ajaxviewersample and deleted the
>>> line #include file="utilityfunctions.aspx"......and tried calling the
>>> weblayout in that file.... where it is giving the error in
>>> initializewebtier().....cant understand what to do and how to proceed
>>> with...
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/InitializeWebTier-tp15729918s16610p15730847.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list