 |
| General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 26th, 2004, 08:14 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Opening MSProject in client machine using ASP.NET
Hi,
I have a problem to be solved yet in ASP.NET. Following is the problem:
I have a MSProject saved in SQLServer using ODBC, which automatically generates tables relevant to data. My requirement is to open this project in client machine in MSProject application as read or readwrite file.
I tried using "Microsoft Project 9.0 object library" to create an instance in some button click event in server side. It gives the following error:
"Call was Rejected by Callee"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Call was rejected by callee.
However i could create instance of Msproject and open file from DSN .. provided if i create an instance in Application_start( ) event, that is local to event & which is irrelevant. Even this will give error when i stop application and relaunch it again. This is due to MSProject process "WINPROJ.EXE" that will be running.
Is there any other way to create a MSproject application using server side script ??
I tried in another way i.e using client side script ...
I used vbscript to create MSproject using CreateObject( ) command.
I could open a MSProject file stored in *.mpp format but not project stored in SQLServer(using SystemDSN). Ofcourse customlevel settings for security tab is required to execute script in client machine.
How to open MSProject stored in SQLServer using DSN either through server side script or client side script ??
Is it possible to open using <a href = "" /> tag..??
please post your suggestions as soon as possible..
Thanks in advance.
--
Santhosh.A.N
Bangalore
|
|

July 26th, 2004, 09:53 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
You are not thinking client-server. What happens when you try to launch an .mpp file with server-side code? The application is going to open on the server. The problem is that the client is not sitting at the server's screen, but at their own. Here is the solution:
You have the .mpp file stored (as binary I assume) in SQL server. All you need to do is create a simple link such as this:
<a href="launchmpp.aspx?mppfile=xxxxxx">Open Project File</a>
Then, this page (launchmpp.aspx) retrieves the mpp binary data from SQL server (using the value from the querystring to identify which DB record to get), and serves it up to the client in binary form using the Response.BinraryWrite() method. You need to clear the response buffer and set the content type to the correct type for a microsoft project file. (Sorry, I don't know what this is off hand.) There are loads of examples of this exact process for images or Excel or other file types. The browser will see the "xxx.mpp" file and since the client's machine has microsoft project installed, it knows that that program handles MPP files. So it opens the file into MS Project automatically.
|
|

July 27th, 2004, 08:41 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you for your useful information.
Actually when i tried to create MSProject in server side, i was able to create the object but when i tried to access any methods of it it sends me "Call was rejected by callee" error.This is not the case with excel application.
However i got solution for that now.I am using client side scripting and it works fine.
Thanks,
Santhosh.A.N
|
|

July 24th, 2006, 11:51 PM
|
|
Registered User
|
|
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Santhosh,
i am having the same problem, that is i am getting this "call was rejected by callee" exception while creating MS Project in server. And also the same exception is getting when i try to connect server in the remote desktop and run the application thru localhost. It would br really helpful if you help me in this regard. Thanks in Advance.
Please look at the expception which i got,
Call was rejected by callee.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Call was rejected by callee.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80010001): Call was rejected by callee.]
System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) +457
Microsoft.Office.Interop.MSProject.ApplicationClas s.get_Projects() +0
Prompt.MSPCreate.CreateProject() in d:\projects\prompt\v1\application\source\frmprojec tdetails.aspx.cs:1344
Prompt.frmProjectDetails.btnExport_Click(Object sender, ImageClickEventArgs e) in d:\projects\prompt\v1\application\source\frmprojec tdetails.aspx.cs:1041
System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs e) +109
System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +69
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Anand A
|
|

November 1st, 2006, 04:46 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
Iam new to programming, can any one tell me how to automate MS Project in .net.
Thanks,
Saravana
|
|
 |