Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is very silly question for some expert.The situation is like this, I have asp mvc4 application I didn't publish it put it to the server, instead of I put my whole developing application solution on the server, Now I changed my method in my controllers in my local computer.

I need update my local change to the application sit at the server, I just need update the controllers, is it right?

Why I do like this, because the PayPal notify return url need return to the life url, so the project not really finish yet.
Posted
Updated 26-Nov-14 18:57pm
v4

1 solution

1.You have to build your MVC project and copy the resulted .DLL file into the bin directory of your application deployed location (on your server). (If you change only the view, in that case you should copy the view file in the associated folder location on your server in View sub-folder.)

2.Regarding your problem root related with Paypal, you should put all your PayPal settings, including the return URL as application settings into the web.config file like in the next example.
HTML
<appsettings>
    <add key="webpages:Version" value="1.0.0.0" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  
    <add key="PayPalUsingSandbox" value="true" />
    <add key="PayPalSellerID" value="XXXXXXXXXXXXX" />
    <add key="PayPalCancelUrl" value="http://localhost:62710/Order/CancelFromPayPal" />
    <add key="PayPalReturnUrl" value="http://localhost:62710/Order/ReturnFromPayPal" />
    <add key="PayPalNotifyUrl" value="http://localhost:62710/Order/NotifyFromPayPal" />
  </appsettings>

3.Better is to use multiple config files, so for example your could have one config file for debug (your testing server) and a 2nd one for release (the real server), and each of them to have different Paypal settings. See details about multiple config file in the next links:
ASP.NET MVC: Keep Private Settings Out of Source Control[^]
http://deanhume.com/home/blogpost/working-with-multiple-web-config-files/4100[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900