After much wrangling I have a development environment for building sharepoint webparts in c#.
I'm completely new to SP development, so I haven't quite found the various API docs, so I'm hoping someone can help get me started.
Eventually, I want to write a simple web part that allows its user to display different content depending on who the current user is.
What I'd like to do first though is just build a dead simple webpart that will simply print out the current user's details - username, full name and any permissions groups that they have.
Thanks
SPContext.Current.Web.CurrentUser
Related
Given a facebook username and password, how do I grab the latest status updates from his feed? Moreover, i'd like to know how to get last updates from user profile.
I'm having trouble finding an answer to this question, and I'd like to know whether it could by done using PHP or C# (C# is prefrred). I'd be grateful if anyone could point me to the solution, thanks in advance !
You can easily do that by using the Facebook Graph API in any language. I suggest you should look at the API documentation, specifically the User Reference Doc (you can retrieve any user's status updates using this). It might take some time to understand how it all work, but you can retrieve user information very easily, provided you have the knowledge of a specific language and you understand how the Graph API actually works (there are plenty of example on the developers' website).
Also, you don't even require user's password for this. All you need is the user's id or username and some permissions from that user (or simply an Access Token).
PS: If you have any specific problem in your code, please update your question with some code that you've written till now and I'll be happy to help you with that.
development of my app has finished, but I want to have general information about my app users.
How can I know they are from which Store/country? store/country-specific downloads
How can I know which languages they are using for focusing on it more.
Will such these informations appear on the dev center or I should have my own server for receiving these information?
Which codes I need, where can I start?
I know I can use device location, but I don't want to use this option
(sorry I couldn't find anything useful by searching)
Update I don't want these informations locally (providing it to the user himself) But I want to know who are my users after sending it to the store.
How can I know they are from which Store/country? store/country-specific downloads
That information is already available in the Store statistics
How can I know which languages they are using for focusing on it more.
Read the Thread.CurrentCulture and Thread.CurrentUICulture , if you want to know what local language/culture the user is user.
The store is bound to the country specified for the users live account.
I have a simple question in which I couldn't find an exact answer to, that question being:If I created an ASP.NET webpage, is it possible for someone to steal my C# source code?And if so, how can I protect my webpage's source code from being stolen/dumped/reverse engineered?
Please if you do know anything about this, as many replies as possible would be greatly appreciated! Thank you guys so very much, even if you just give me an idea on this topic! :)
Are you talking about a corporate user or a regular user?
Someone accessing your website from a web browser, like a standard user can not access your aspx/cs server side code. However if you are talking about a corporate user, if they browse to your web server and have access to your inetpub\wwwroot directory (or wherever your source resides) they have full read or maybe even write access. It all depends on the type of user, and the user security system in place for your domain, whether the person trying to get in is part of your domain and has proper privileges on your server. Also some client side scripts are exposed to user's as well.
So as far as server side scripts, users not part of your domain, and stringent security settings on your web server, are all factors contributing. But I think you mean in the context of a user just trying to access code from the web browser without any additional permissions. Which in this case would be no.
Not a complete answer but your C# code will be better protected if you use a Web Application rather than a Web Site. Your C# code will be compiled so even with an FTP access (or a direct access to the production server, if you suspect an inside threat), one won't be able to download your .cs files. Of course, one can download .dll and reverse engineer but that's something.
Read more about Web Apps vs Web Sites here : http://msdn.microsoft.com/en-us/library/dd547590.aspx
To the best of my knowledge there is not a way for someone to steal your asp code unless you allow them to see the file itself. If you view source you will see that the majority of the asp code has been changed either to html or javascript.
If I created an ASP.NET webpage, is it possible for someone to steal my C# source code?
Yes it is, there just to many ways how this can happen, vulnerability in the hosting environment, IIS exploit, your code allowing to download things etc. Just accept that your libraries (I assume they are compiled by the time you deploy) will be downloaded and protect them accordingly.
How can I protect my webpage's source code from being stolen/dumped/reverse engineered?
You cannot have an ultimate protection, but you may make life complicated for the person trying to reverse engineer it. Probably the most effective solution is to use code obfuscation. You may also want to read more general documentation on this topic, such as Design Guidelines for Secure Web Applications.
I am building a new website, which you can see at http://www.kristalcapljina.99k.org.
While I have some web design experience, I need help in knowing what I should research to add some specific functionality to the site.
The first bit I want to add is an area where business owners can list their business' information, such as the address or contact information. They should also be able to login later to change the information. I assume this will need some sort of database, but don't know where to begin looking.
Second, I wish to add a map that highlights the locations of these businesses.
Any help direction you can give me to get started would be most appreciated.
You want to embed a Google Map onto your site, using the Google Maps API.
Migrating (rewriting) a whole portal originally made in .net to shareopoint doesn't seem like a very easy thing to do.
I've been assigned such task and now i'm just learning, planning and starting to get things practical in order to accomplish it faster.
It's not exactly a question, it should be a discussion about it and may help others who might get to do the same job further on.
1 - There's something like a "message board" in the current portal, which i'm planning on building with a blog site kind, what do you sugest?
2 - as asked in another question, i have to manage users, and the local active directory is organized and reliable, so i guess that's what i'm going to use
3 - There's got to be a way to store files, images, documents and having version controlling in some of them.
4 - There's got to be a customization in design and a cleaning in the default controls of sharepoint masterpage (which may be useless for the desired purposes)
5 - About 30 local users and being accessible from the internet (local server) in case our consultors have to access it from clients
6 - i have available a version of the Visual Studio 2010 (already with the graphical webpart designer) because the company i work is MS gold partner.
7 - I'm going to program webparts in c#, and the designing part is still a mistery to me, since i'm not that familiar to shareopint yet.
I'd like some tips, links and answers.. i'm going to be watching this question from now on and answering any other information.
1.) SharePoint 2007 has some blog/wiki/board functionality but it's very immature. I tried to get my team to use them but the user interface is lacking and it is challenging to enhance those elements. SP2010 might offer a better experience though.
2.) User management in SharePoint is easy to perform but difficult to manage. Establish processes for adding/modifying end users and keep the number of people with that ability to a minimum. Otherwise it gets out of control and you end up not knowing who has access to what. I would also suggest relying on AD groups as opposed to giving individuals specific access in sites.
3.) Document storage is SharePoint's forte, I think you'll be impressed.
4.) SharePoint branding will require some time but other people have it down to an art form. Note that some pages (referred to as Application pages) shouldn't be fully controlled. Also note that you don't want to remove controls from the master page as some functionality in SharePoint assumes the controls are there - rather it is better to hide them using CSS.
5.) This sounds like a bad idea. SharePoint exposed to the Internet is supposed to be severely locked down - but if you lock it down (i.e. remove access to Application pages), the functionality that you seek won't be available. Have you considered an intranet and separate extranet?
6.) Should be okay, VS2010 is supposed to be a better development experience with regards to SharePoint.
7.) Keep your branding and functionality separate and be sure to deploy them using solution files (as opposed to working directly with the file system). Also, never ever read/write the database directly.
I think you'll find that replacing a custom intranet with SharePoint is a common task but there will be a learning curve. The hard part will be branding and data migration. End users will reject the new system if it is slow - so be sure to get the architecture and configuration right before launch (might require a consultant).
1 - There's something like a "message
board" in the current portal, which
i'm planning on building with a blog
site kind, what do you sugest?
SharePoint discussions are perfect for what they are intended ... small targeted discussions. A forum is very different. It is a centralized area with multiple threads with different topics. You can try CodePlex (which is your friend)
SharePoint Forums
2 - as asked in another question, i
have to manage users, and the local
active directory is organized and
reliable, so i guess that's what i'm
going to use
AD is perfect if you already have it ... nice thing is that you can use the Profile page to update AD information which syncs ... you have a lot of capability with this. But, one of the main benefits is that SharePoint can support multiple authentications. You can extend a SharePoint site and plug in a different authentication (like SQL Auth) and then multiple sets of users can interact on the same sites with different permissions. Not to mention that SharePoint doesn't just provide site access but you can make security granular all the wat down to individual items in a list or library.
3 - There's got to be a way to store
files, images, documents and having
version controlling in some of them.
This is where SharePoint has the most capability OOB.
4 - There's got to be a customization
in design and a cleaning in the
default controls of sharepoint
masterpage (which may be useless for
the desired purposes)
We have a completely customized MasterPage complete with code behind. You need to know about Feature Stapling and Feature Receivers. Also use Heather Solomon's website
5 - About 30 local users and being
accessible from the internet (local
server) in case our consultors have to
access it from clients
SharePoint seems almost overkill for this number of users.
6 - i have available a version of the
Visual Studio 2010 (already with the
graphical webpart designer) because
the company i work is MS gold partner.
Get the Visual Studio Extensions for SharePoint
7 - I'm going to program webparts in
c#, and the designing part is still a
mistery to me, since i'm not that
familiar to shareopint yet.
Look into Application Pages instead of WebParts ... Application pages are way more flexible for custom forms than web parts. Web parts are only usefull for when functionality needs to be available on an ad hoc basis so that you can allow users to drag the functionality onto a page or if you need to restrict functionality to specific sets of users (since layout pages are available to all sites).
The answers to this person's similar but not identical question may be helpful: Sharepoint for a C# Asp.net Developer
There's a lot of help available in other existing SO questions. Just click on the "sharepoint" tag, then sort by votes, and you'll find a lot of interesting reading.
Regarding 7 - Programming web parts:
Have a look at SmartPart on CodePlex. This is a fairly easy way to create simple web parts especially if you have some ASP experience.