I have an old website developed in classic ASP, I need to add openoffice functionality in it, so I have created a DLL using UNO services of OpenOffice in VB. I have tried that DLL from locally using in another EXE project and even on command line project.
The problem starts when I use that DLL to ASP. It says 'ActiveX Component Can't Create Object', I have searched a lot and finally I decided to ask some experts regarding this issue. As from my searches it says there is some issue with IIS security. I need to configure some directories with some particular user rights and some DCOM service configuration, seriously I don't know anything about setting user rights to IIS and setting DCOM Services rights, below are URL that points to that issue.
http://www.oooforum.org/forum/viewtopic.phtml?t=24400&highlight=activex+component
http://www.oooforum.org/forum/viewtopic.phtml?t=73470
http://www.oooforum.org/forum/viewtopic.phtml?t=26366
I think there is not such Step-By-Step post available who can direct openoffice users to configure with IIS and ASP.
Please Help, as its and urgent issue.
Thanking You,
Regards,
Verify if the App Pool assigned to your site or virtual directory has the "Enable 32 Bits Applications" parameter in True. Setting it to True was the solution to a similar problem a was facing some time ago.
Finally i found the answer by my self.
I have created a service in windows that calls star office document with administrative privileges.
Related
I have a program running as a service in IIS in Windows Server 2008 R2. The program has no problem creating a report in Excel. The problem occurs when it tries to get access to the Excel the that it has just created. This gives the users a 80070005 error right at this line of code:
Excel.Application excelSS = null;
excelSS = new Excel.Application(); <-- Error
Because at that point, the program has not tried to get access to the Excel file just yet, I believe the problem is not related to lack of access rights to the file. I believe the problem may have to do with locating the Excel program. This may have to do with the fact that the Excel is 32-bit and the Windows operating system is in 64-bit. I am not sure.
The strange thing is that I have no problem viewing the Excel report through IIS. Another IT guy also has no problem doing this. But normal users all have this problem trying to do the exact same thing. This all points to the high probability that this problem is related to "access rights". If it has to do with the setup of Excel, I would assume that everyone including me would have the same problem. This is very puzzling.
I have already tried all the tips that I can find in Internet:
Confirm that the Application-Pools in IIS uses IIS APPPOOL\DefaultAppPool user account.
Add a "Desktop" folder in system32 and in SysWOW64 under config\systemprofile and make sure the IIS APPPOOL\DefaultAppPool user account has read/write access to those folders.
Run DCOM-Config, and assign local access/launch/activation rights to IIS APPPOOL\DefaultAppPool under COM-Security. And make sure both 32-bit and 64-bit DCOM-Config get these settings.
Because of the fact that the users use "Windows Authentication" to run the program in IIS, I also make sure that the users can use their own user account to get access to the folder in IIS server that stores the Excel file.
I even go as far as adding IIS APPPOOL\DefaultAppPool to local admin user group.
The only tip that I cannot try is the fact that I cannot find "Microsoft Excel Application" listed in DCOM-Config program (Component Services --> Computers --> My Computer --> DCom Config). I am supposed to add launch/activate access rights to IIS APPPOOL\DefaultAppPool to "Microsoft Excel Application" in that list. But somehow "Microsoft Excel Application" is not in the list. I have tried looking for it in DCOM-Config in both System32 and SysWOW64 folders. This "seems" like where the problem is. But I am not sure about this because of the fact that I have no problem viewing the Excel report using my user account. If there was something wrong with the settings in Excel, I would think that none of us could view the Excel report.
I didn't have this problem when I had that program in Windows Server 2003 R2 - 32bit, or in Windows XP 32-bit.
I understand the issue about Microsoft want people not to use Office Automation in Windows Server 2008. And Microsoft wants people to use XML or something like that. But I also understand that people have tried this and can work around this. Because I am not the developer of that program, I really don't want to start changing that program. Therefore, I would like to be able to get the existing program to work.
Please help. Thanks in advance.
Jay Chan
Turned out this problem has to do with access rights. Seem like ASP.NET was running under the user's authentication (not surprising because I have set the web service to use "Windows Authentication"). And the user doesn't have permission to run Excel directly at the server. The solution is to use a special domain user account: (1) Assign the special user account as the local admin, (2) Assign the special user account as the "Specific user" for "ASP.NET Impersonation" for the web service.
I have a feeling that the special user account was somehow embedded in that specific web service. Therefore, the fix that I mentioned above may or may not work for other people. Unfortunately I don't know if this is true or not because I was not the developer of that web service. And I cannot find any where in the web service mentioning anything related to that specific user account.
I am glad that this is fixed.
Jay Chan
I thought I'd give SharePoint development a go, to broaden my understanding of Microsoft technologies and ran into a situation I refuse to understand.
I have a new web application created: http://localhost:11523 and set up the site collection as required. I can browse to the web site fine, without any issues, but now I want to start developing against this, using the object model.
Right, so after I struggled with SPSite site = new SPSite("http://localhost:11523"); I figured that I'm not running VS2008 in elevated permissions, so restarting VS I finally got one step further.
Whenever I step into my code, I get:
The Web application at
http://localhost:11523/ could not be
found.
I've Googled this without luck. The application is most definitely there, I can browse it, add web parts and go mad. I just can't seem to connect to it via Visual Studio.
Any ideas would be great.
EDIT
I thought I'd isolate my method, called "GetListFromSharePoint(string name)" into a test method (nUnit Framework) and to my surprise returned 9 entries from the list, as expected. When I dumped the method back into my web application (not SharePoint, trying to test the Composite Control through a normal Web site), and run into the mentioned problem.
This is in SharePoint 2007, and I'm developing on the same machine onto which SharePoint 2007 is installed.
This approach used to work, for some reason, I just can't get it to recognize SharePoint. The test stubs work find, just not the web application.
Edit 2
So there where a couple of things I "missed", which kind of solved the problem by itself.
Firstly, I was developing on a x64 Windows 2008 box, thus SharePoint 2007 was running in x64 mode. Cassini, turns out, is 32bit regardless of the platform you run it on, which caused some compiler bugs (I did not have IA64 compilers installed). After installing this, I figured out that the default web site (localhost:80) had been disabled by SharePoint.
Renabling the default web site, allowed me to create my web application as a virtual directory against it, which allowed my debugger compiler to run in x64.
My next challenge was access permissions. Because any new virtual directory on port 80 is assigned to the default application pool, is it assumed that the user does not have the right permissions, so I had to change my web application to run under my SharePoint web application's application pool.
The last thing I had to do was run my SharePoint code with elevated permissions.
Working like a charm :D
Note! Enable debug on your SharePoint web application....
Thanks,
Eric
(You have not specified version - assuming SharePoint 2010).
You need to decide what object model you want to use:
client (to be able to access the server from any other machine)
server (the one that you are trying now, can only be run locally).
Most likley reasons your code not work:
using "localhost" instead of ""computer name" in the Url. (I believe it is the reason.)
you are running your code not on the same machine as the SharePoint
you are running code under non-admin account
Check out how sites collections are configured in "Central Administration" site - urls associated with each site collection are listed there - make sure you are using correct one.
You can also try enumerating all site collections in SPWebApplication (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.sites.aspx) to start expiriments.
I dont think the SPSite connect through the IIS, and if SharePoint isn't set up to respond to localhost (done in the Central Administration) you wont be able to connect to that url. IIS works a bit different here since it relays the signals to "localhost" to the "web application instance".
Start by checking in your SharePoint Central Administration. Go to "Configure alternate access mappings" in the "System Settings" section. Here you have your SharePoint instances, there are three properties which you can see directly in the list; 'Internal URL', 'Zone' and 'Public URL for Zone'.
If the Internal URL isn't set to Localhost you wont be able to use that connection you suggested. It bay be improper to change this to another url as well, so simply try to set your SPSite site = new SPSite("http://yourinternalurl:11523"); to whatever's in that box! :)
Cheers
I've installed SharePoint Foundation on Windows 7 Home Premium using the tutorial at:
http://msdn.microsoft.com/en-us/library/ee554869%28office.14%29.aspx#50
Everything went well except for the last step when I actually try to load either the site or Central Administration. Instead of a Foundation website, only a blank page appears.
I tried without success the suggested solution to change IIS -> Authentication -> Basic Authentication to Enabled.
After this change it was necessary to enter a username and password when trying to access a Foundation site. Unfortunately, after entering correct data a "Server Not Found" message appeared and I was not able to proceed.
Any ideas?
Thank you for your time,
Ben
1st step of troubleshooting this is to take SharePoint out of the equation. Setup a new web application in IIS, put in a simple 'hello world' type static html page and try and load that. If you can't then the problem is IIS/networking and not SharePoint.
For what it's worth, I've found a way to install SharePoint Foundation 2010 on Windows 7 Home Premium and solve the Windows Authentication issue (you CAN actually enable it on Home Premium as well - it's just a manual process, that's all).
You can find the steps I followed on my blog at http://www.rl-soft.com/en/blog/Lists/Posts/Post.aspx?ID=21
Hope this helps a few folks!
Raphael.
I'm getting the following error while trying to create a SPSite instance (not open it, just create it):
"The Web application at <URL> could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application."
I have SharePoint Foundation 2010 installed on x64 Windows 7 laptop and VS 2008. I've done a lot of searching the last couple of days and I've tried any suggestion there is:
Setting user permissions to the database.
Targeting the application for x64 CPU.
Running my app with the sharepoint app pool account. Creating new app pool.
Creating windows forms and console applications to run the code from there.
Adding and removing the web application administrators.
Checked the logs (nothing in there).
Writing the URL in full, with machine name and with IP.
The funny thing is that the same code was working fine at one point and then just stopped. I cannot recall to have done anything special to damage it.
Any help will be much appreciated.
Regards,
Martin
To answer my own question the sharepoint site had to be on the default port - 80. Publishing it on any other port and trying to access it by putting the port in the URL did not work. Strange but it worked.
I have been investigating building web parts for sharepoint 2010 and currently have a single instance of SP2010 on the work servers. I would very much like to be able to test them locally (on my laptop) if possible, without having to install sharepoint 2010 on my laptop (is this even possible?!)
Is there a way to test web parts and do I need to install all/part of sharepoint on my laptop?
Thanks
If your Web part is simply displayed in a SharePoint page, without using the SP API, you could simply host it in an ASP.NET page on your laptop, but this is not a common scenario.
One new feature of SP 2010 is the client API, i.e. a subset of the full API that can be used outside of the farm. If your usage of the API fits in this subset, this could be useful, but you will still need to access a SP server somewhere.
Another option is to put all the code that uses the SP API in something similar to a Database Access Layer which talks to SP on one hand and returns business objects (not lists or lists items). This way, you could simulate this part on your laptop and concentrate on the look of the Web part and its business rules, without SP. If this part is in its own DLL, the only reference to SP DLLs would be there, so the project on your laptop would not need to reference the SP DLLs.
There are two ways: the good one and old-school.
The good way is to install Sharepoint Services (http://technet.microsoft.com/en-us/windowsserver/sharepoint/default.aspx) and deploy WP locally. It works only if you have Windows Vista or Seven. It is the most productive way so i recomend it.
Another way comes from SP2003 era... The idea is to develop custom Web Control, test it locally with IIS or just development server, and then to embed it into web part. The method is described here - http://www.reflectionit.nl/SmartPart.aspx . It's an old and painful method. Unfortunately we can't use (without troubles) Microsoft.Sharepoint.dll etc
P.S. Sorry for my English...
This came up at our office and we ended up installing Sharepoint Foundation on each developer's PC, which allows us to develop and debug locally. Here is the link that I used to get this working.
Setup Dev Env. For Sharepoint Foundation on Win 7
I would say get a virtual machine.. but I dont think you can run 64bit VM's on a 32bit OS.
You'll have to upgrade to 64bit.
I don't think there is a good way around this; you will spend a lot of time on something of questionable value if you do not install SharePoint either on your laptop or in a VM and do it the proper way.
You can just swap out the inheritance from the SharePoint Web Part to the ASP.NET equivalent and back again - all the functionality is the same because the newer version was designed with backwards compatibility in mind. Use the ASP.NET version when testing on your laptop.
Here is some more info :-)
http://weblogs.asp.net/scottgu/archive/2006/09/02/Writing-Custom-Web-Parts-for-SharePoint-2007.aspx