I have a open source .NET application. I want to brand it with my website and offer users to purchase a license to remove it. But how can I do this if I give out the source code? What is the best way to do this without effecting performance too?
Firstly, you need to ask yourself what you want to accomplish. When you release software into the open source community, you can make money still on support etc. When people buy your software, unless you have a patent on it, they are not buying it for the code itself. Instead, they are buying it because you already spent the time to make it. They can create it themselves it's just a factor of time and money. It's cheaper to buy it from you since it's already done. If your customers begin to copy your source everywhere without paying you then they may be the wrong types of customers for you. If you want to release your source openly, then market your software with other things like your ability to know the market best, your status fo being ahead of the game already by already having spent tons of time on this particular need you are filling, etc. If you think the actual code is what everyone is really interested in, then maybe look at only releasing compiled DLLs to help deter people from easily reading your source. In my experience though, the source is easy to get even if you compile DLLs and customers, especially business customers, will still pay since they are paying for your software that is already done and hopefully a long-standing relationship with you for more software in the future!
Don’t confuse “open source” with “free software”.
Most open-source software at the moment is “free”. This means that the author has given everyone the right to copy and modify it. Of course there are many free-software licenses with various nuances, but this is the general principle.
Free software needs to be open-source in order to be free, but your software need not be free and can still be open-source.
We are treading into legal territory here, and obviously I am not a lawyer, but the basic idea in copyright law is that you (the author) decide what people can do with your work (your program). You can set up a license which allows people to see the source code, and perhaps even modify it for their purposes, but you can still prevent them from redistributing it or a modified version of it.
Of course people could illegally modify and copy your program behind your back, but it would be illegal to do so and you could prosecute for damages.
Regarding the second part of your question (performance), I don’t think it’ll be an issue as such, but you haven’t specified much detail about what you mean by “branding”. Of course the performance characteristics depend heavily on what you’re doing there and how you implement it. Personally I would recommend that you edit that part out of your question and ask it as a separate question (with more detail). Then I’ll edit out this part of my answer too.