Reply
Highlighted
Member
Posts: 1
Registered: ‎08-10-2012

Web Forms vs. MVC for AIM

So my entire site is Web Form based, not MVC, but I need to use AIM. I created a new MVC 2 empty project called "AuthorizeNet" within my solution (Visual Studio 2010, C#, ASP.net 4), downloaded the AIM sdk, added a reference to "AuthorizeNet.dll" from my desktop in the new project, then added a reference to the AuthorizeNet project in my existing Web Forms project. (if I attempt to open the MVC 'existing' project in my solution, it's going to want to convert the entire solution to MVC, which I can't / don't want to do). Next I created a new cs file in my web forms project, added "using AuthorizeNet;", and tried to add some instantiations shown in the SampleAuthorization example shown in Quick Start (new AuthorizationRequest, new Gateway), but these are not recognized assemblies. So, my basic question is whether your MVC implementation is going to work with Web forms projects, or am I expected to convert entire projects to MVC just so Authorize.net can run?
Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Web Forms vs. MVC for AIM

All you need is the AuthorizeNet.dll in the bin folder.

Not sure what " then added a reference to the AuthorizeNet project in my existing Web Forms project." mean, or why.

 

The dll would work with Web forms, MVC , and console app.

 

You don't even need the dll, download the source and pick and choose methods that you need and add it to your project app_code.

Highlighted
Member
Posts: 6
Registered: ‎08-14-2012

Re: Web Forms vs. MVC for AIM

[ Edited ]

I think he is saying he doesn't want to use any of the MVC stuff. The current SDK seems to require you to use an MVC project (whcih I as well do not have and do not want to use or convert my project to. I want to be able to use the SDK easily inside a Web Forms project, without having to rip code out of the DLLs and put it in my own project.

 

This issue maily refers to the Helpers, specifically the BeginSIMForm, which appears to require use of the MVC HTML Helper in order to work.

 

I don't think that is an unreasonable request.

Highlighted
Member
Posts: 6
Registered: ‎08-14-2012

Re: Web Forms vs. MVC for AIM

I found a solution for adding MVC capability into your webforms application:

 

http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc

Highlighted
Contributor
Posts: 21
Registered: ‎08-17-2012

Re: Web Forms vs. MVC for AIM

I noticed the MVC required appears to be MVC version 3. At least based on the sample code. I'm new to MVC so I'd really like a "Pure" ASP.Net approach over MVC at this point.