Access Sharepoint From Project Professional 2007 Using VBA - sharepoint

I have many Microsoft Project Servers and I have written a Project Guide that I would like each one to use. Because I only want users of a particular server only having access to their server and not others, I need to store the Project Guide on the SharePoint of each server. In Project Professional 2003, is there a way of knowing the URL in VBA (an object maybe) to its own server that it is installed on.
This is an example of what I am trying to do:
Sub Currently()
OptionsInterfaceEx ProjectGuideContent:="https://example.com/SERVER_NAME/Shared%20Documents/Project%20Guide/xmlschemas.xml"
End Sub
Sub What_I_Would_Like()
OptionsInterfaceEx ProjectGuideContent:=Application.ServerAddress & "Shared%20Documents/Project%20Guide/xmlschemas.xml"
End Sub
I am doing this so I do not have to edit the URL for each server we have.
Any questions please ask,
Andrew

An approach we took to solving a similar problem was to implement a simple "who am I?" web service which you host on a given server. From reading around on StackOverflow it looks as if it is possible to make web service calls from VBA. The web service simply returns the IP address or host name it sees the request coming from, and you use this to build your URL.

Related

Creating a website with functionalities as given below:

VenEx wants to create an Interactive tool on WIX or any other no code web platform. We would like users to input 6 params on the website, connect the website to an Excel spreadsheet that does the calculation & displays graphs/output back on the website. Pls. Advise
The proper way to do this in Wix would be to use Velo, which requires a bit of coding. But, you won't need to use the spreadsheet because you can write the calculation logic into the site itself.

first time using SSRS web server, setting up website

its my first time using this and as a newbie I have many questions. Any help are appreciated.
My ultimate goal is to have reports created from database that will be able to be accessed by other end users on website so they can view/filter the report data online in a shared way with some user control settings.
So I have already made my reports in the visual studio linking to databases.
And I have also set up the Reporting Service Configuration Manager so that I can access SSRS home page and the site setting at http://'127.0.0.1'/Reports/Pages/Folder.aspx
Now my question is, how will the other end users be able to get onto the website and get access to the reports I created with SSRS? Do I upload the reports in .rdl on my report site manually or do I deploy it from VS? How do I turn my '127.0.0.1/Reports' into a public site for other user's access? Or do I have to create it using a sharepoint?
Thanks so much, I need a guidance to head toward the right direction! :)
Now my question is, how will the other end users be able to get onto the website and get access to the reports I created with SSRS?
Users will need 2 things from you to access the site: the server name/address, and a means of authenticating to it. By default, authentication is handle via Windows domain auth (which you can change, with varying degrees of effort...).
Do I upload the reports in .rdl on my report site manually or do I deploy it from VS?
It actually makes no difference in the end; do whichever you find easier. (There are also plenty of other ways to deploy reports, such as through powershell!)
How do I turn my '127.0.0.1/Reports' into a public site for other user's access?
Well you're halfway there - At this point, you could probably open up your firewall (port 80, maybe 443 depending on your config), and have people connect to your computer via IP or hostname - for example, if your computer's IP was 12.34.56.78, they could visit 12.34.56.78/Reports/ and access the site. If you have a means of creating a URL and pointing it to your SSRS server, you might need to open the configuration manager again and bind that URL to SSRS.

Excel 2007 Pass-Through Windows Authentication

I've created a simple (asmx) web service which returns a DataSet.
I've added the webservice to my Excel 2007 workbook using the Data -> From Web button and I'm able to view / refresh the data.
The problem comes when I need to secure the web service: I've turned on Windows authentication for the web service and the request uses SSL.
Unfortunately, the user's logged on windows credentials aren't used by Excel when trying to refresh the data - the refresh fails.
If I click on Data -> Connections -> Properties -> Definition -> Edit Query, only then am I prompted for my windows credentials and does the refresh then succeed.... not a problem for me, but not something I want every user of this spreadsheet to have to do... any ideas how to make the prompt come up when the refresh is attempted instead of having it fail??
Thanks!!
Update Answers so far are to do with SharePoint and Excel Services (neither of which are any use to me)... and one link for which "The following procedure does not apply to data that is retrieved from a text file or a Web query"... I just want a person with a copy of excel on his desktop machine to be able to update from a password-protected web service... is that so hard Microsoft??
Another Update Still no answers accepted - because no answers so far have provided a working solution ( Nice googling though - thanks guys ;-) )
While I haven't got SSL I can attest that Excel normally shouldn't ask you for authentication when using pass through authentication.
My guess is that you will need to add the destination website (with the https) to your trusted zone in IE. The effect should be that when you go to the website you shouldn't be challenged for your password at all. IE will now pass through the authentication credentials because the destination is in the trusted zone.
Once this is fixed Excel should treat it like a normal website.
Here's a link which talks you through adding your site to the trusted zone: http://www.nateirwin.net/2007/01/19/enabling-ntlm-authentication-in-firefox-and-internet-explorer/
The last time I dealt with this issue was in 2004. If I remember correctly, this is a bug in the Web Query technology in how the query deals with the SSL certificate. This is Excel 97 technology; therefore, fairly basic implementation.
After much research and troubleshooting, the only way around this issue is to create user and password parameters and post the web query. Using POST will keep the user/password hidden from prying eyes.
Following is my note from 2004: There is a problem with https, application/vnd.ms-excel, Internet Query (iqy), and Excel 2000/2002.
Have you checked out this question: What do I need to do to make Excel access a Web Query via HTTPS?
Excel's Web Queries Enable You to Populate Worksheets from Web Sites at http://msdn.microsoft.com/en-us/library/aa155714(v=office.10).aspx.
Sites requiring authentication and passwords provide additional
challenges. They may require coded workarounds or may be unsolvable.
Error message when you use Web query to a secure Web page () in Excel: "Unable to open" at http://support.microsoft.com/kb/290347.
XL97: How to Create Web Query (.iqy) Files at http://support.microsoft.com/kb/157482 is an invaluable resource. (There was a Web Query SDK once that I cannot find, but this article is a good replacement.)
Different Ways of Using Web Queries in Microsoft Office Excel 2003 at .
I don't know if this will help, but I faced a similar situation while importing data from a remote SQL Server Database. What I did was create a role inside the database itself, and assign any users who needed access to that role.
The data is updated into the workbook when the file is loaded using Microsoft Query, so I don't know how that might differ from how you have done things.
The biggest issue with doing it this way was to open the properties for the query and check the "Use Trusted Connection" box. This worked without an issue for me. Again, this was from a remote server, not a secure website. Hope this helps.
i hope this will help you : Refresh connected imported data
We had a similar situation at work, however, we are using Office 2010. I'm not sure of the limitations of 2007. Check out these links. The last two are specifically for Excel 2007.
Link 1: Configure Secure Store Service for Excel Services
Link 2: Ten Tips for Using SharePoint Server 2007 with Excel Services
Link 3: Plan external data connections for Excel Services

ODBC connect with propritary driver/Excel Trust settings

I have a spreadsheet in Excel that connects to an internal DB using the odbc driver for the software (Action Request System). That works fine. Now I'm trying to move the Excel file to a SharePoint site so that our team can review the data and make notes in the same spreadsheet.
So, first I tried just moving the Excel file to the server, but realized that the connection saved in the file was pointing to the connection file on my computer. So I moved that to the SharePoint site, and this seems to be working... Except:
1) On some of the computers, it opens just fine. But I'd prefer it if the dialog that asks for the login and pw for the DB was customized.
2) On other computers, the software and drivers are installed, but not showing up in the user source list, so it throws an error. When the user goes to create a new connection, the driver is there, (so its not in the first list, but it is in the larger list).
3) Macs can open the file, but Excel 2008 can't do the macros and connections.
4) Opening the same file from the same site throws the Trust Center warning each time, even on the same computer/same user.
Is there a way to do any of the following?
Have a non-macro that keeps the user from saving (and thus overwriting) the sheet until it is confirmed that the user won't make changes to the connections/macros?
Allow the user to connect from a local config (in case they can set one up that works when the main one fails) so that they can connect using that one but not screw it up for everyone else.
Set the trust settings (local or on server, I suppose) so that any files from a specific SharePoint are always trusted?
Finally, and this is the big one...
Can you create a connection using a driver not on the local machine? If the driver is installed on a remote server, can Excel use that one? If that were the case, that would solve almost all other problems (Unless you're on a Mac).
I feel like I'm going at this slightly wrong, but since the team all need to see each others notes, our only other solution is to upload the data (from the DB) into a MySQL db so that they can make notes from their browser. This makes it more universally available, but forces us to script a lot of functions that are standard in Excel and create redundant DBs.
Wow! Access to the ARS via ODBC! I suggested that feature to the architect when I worked at Remedy HQ back in the nineties. Great times.
Anyhow, I think your approach of sharing an Excel sheet that connects to an ODBC source is not the easiest path. (As you've been discovering.) ]
ODBC is always a local driver, afaik. A client locally connects to ODBC. ODBC then can use the network to connect to the DB.
Instead, I suggest that you investigate setting up Access with a table that is remotely connected to the ARS system. You could then remotely open the Access table via file sharing as opposed to a dbms-connection. I believe that this would be easier to get going than your current path.
HTH,
Larry
It sounds like you are using a User DSN to make the connection. You can switch to a DSN less connection by using a connection string. If you need some help with that, can you post the code that needs modified?
First, thanks to both users that provided answers. Both of you were really helpful in getting my mind around the problem.
So, it turns out that while you can't easily connect to Action Request DB directly, AR does support Web Services.
Rather than attempt to make Excel, Access, PHP, or any other system deal with creating a Soap Client and handle the work themselves, I came up with an alternative that I think is fairly clever, if I do say so myself:
1) Created a php script that calls the Web Service with the requested data,
2) The script parses the response into a more generic XML form,
3) script echoes out the xml
4) Name the script "AR_Data_Request.xml"
5) Configure the directory, via the .htaccess file, to treat xml files like php
Now, I have a static xml file which always contains the most up-to-date data from Action Request. I can point any other apps (specifically Excel) to that xml file instead of having to write VBA code to query the web service directly (and still have to do it again for php).
The only problem is that I can't get the php to connect to the Web Service (doh!) but that will be my very next question.
Thanks again!

How Can I Find Out *HOW* My Site Was Hacked? How Do I Find Site Vulnerabilities?

One of my custom developed ASP.NET sites was hacked today: "Hacked By Swan (Please Stop Wars !.. )"
It is using ASP.NET and SQL Server 2005 and IIS 6.0 and Windows 2003 server.
I am not using Ajax and I think I am using stored procedures everywhere I am connecting to the database so I dont think it is SQL injection.
I have now removed the write permission on the folders.
How can I find out what they did to hack the site and what to do to prevent it from happening again?
The server is up to date with all Windows updates.
What they have done is uploading 6 files (index.asp, index.html, index.htm,...) to the main directory for the website.
What log files should I upload?
I have log files for IIS from this folder: c:\winnt\system32\LogFiles\W3SVC1.
I am willing to show it to some of you but don't think it is good to post on the Internet. Anyone willing to take a look at it?
I have already searched on Google but the only thing I find there are other sites that have been hacked - I haven't been able to see any discussion about it.
I know this is not strictly related to programming but this is still an important thing for programmers and a lot of programmers have been hacked like this.
It appears that the attack on your website was part of a mass defacement carried out by SWAN on 21 November, 2008 against Windows 2003 and Windows 2000 boxes running IIS 6.0. Others here have suggested a number of things. I would only add that whenever you decide to bring up the website, please format the box and reinstall from scratch. Once a box is compromised, it cannot be trusted, at all, however you clean and purify it.
IIS Process
Check that your ASPNET process does not have privilage to write files on the server. If you need the process to have write permissions, allow them only to do so on a specific folder, and deny execute permissions on that folder for all User accoutns.
SQL Injection
To see people looking for SQL vunrabilities have a look in your log files for the following text, "CAST(".
Do you have any places where you build up SQL in the code behind to query the database? These can be prone to SQL injection attacks. By replacing code such as the following you will be more safe.
Dim strSQL As String = "Select * FROM USERS Where name = '" & Response.Querystring("name") "'"
then consider an alternative like the following.
Dim strSQL As String = "Select * FROM USERS Where name = #name"
and then adding the corresponding SQL PArameter to the sql command.
Hopefully you've had your IIS logfiles turned on and hopefully the hacker didn't erase them. By default they're located here: c:\winnt\system32\LogFiles\W3SVC1 and will generally be named after the date.
Then it's probably helpful to figure out how to use log parser (from Microsoft), which is free. Then use this guide to help you with looking forensically at your logfiles. Do you have a firewall because it's syslogs might be helpful.
Another decent tool to help you find sql injection issues is to go here and download HP's Scrawlr.
If you have any more questions about what you've found, come back and ask.
Well, for starters:
Have you patched your server?
Do you have lingering remnants of things like FrontPage Server Extensions, Office extensions for web, etc.?
Have you made sure you don't have SQL Injection vulnerabilities?
Have you googled for that text, "Hacked by swan"? There are many hits, perhaps one of them has figured out his entrance
If you do have, or is unsure about, whether you have SQL Injection problems or not, then you can ask further here, but otherwise I would get some security experts to help you.
This is indeed a programming site, so unless your problem is programming-related, it will most likely be closed again.
You might want to give try it using a penetration toolkit like Metasploit to discover any obvious holes.
Also, please post your log files if they are untampered with.
The first thing you should do is check your log files. You could paste them here,and we'll tell you if we recognize an attack .
Set up Google Analytics and review all requests that were made to your website.
If you are dealing with SQL injection through the query string you an easily find out what they did, and how they found your vulnerabilities.
Is FTP turned on?
I once had a customer's who had left their FTP turned on for some reason, and the hacker had just set a bot running, trying random/common user/password combinations. That hack was worse than yours because it didn't show on the web pages, but tried to install an ActiveX...
So, you could check your FTP log.

Resources