Run ASPX file from Stored Procedure?

  • Hey,

    After my Stored Procedure has run, I need to call a https://site/blablabla.aspx file. Can this be done from my Stored Procedure?

    Thx,

    Raymond

  • Raymond van Laake (12/9/2013)


    Hey,

    After my Stored Procedure has run, I need to call a https://site/blablabla.aspx file. Can this be done from my Stored Procedure?

    Thx,

    Raymond

    Not as far as I know, and I don't think you'd want to do so anyway. Stored procedures run on the server. Opening an web page from the procedure would open it in a browser on the server and if it was running unattended, there wouldn't be anyone there to see it. Personally, I don't like to surf the web from servers at all. There's usually no real need to and you're consuming resources that would probably be best left to doing server-type things.

    If the ASPX page contains .NET code you have to run after your procedure completes, look into creating a .NET assembly. http://msdn.microsoft.com/en-us/library/ms254956%28v=vs.80%29.aspx. I like to keep everything in SQL, but I understand there are some things you cannot do with SQL. An no, I'm not trying to inspire a debate with that statement. 😛

  • That is a yes/no question. The answer is Yes BUT you can't do it without some work. You'll need to write a SQLCLR to do it that way. Or if the call can be deferred write the information into a table and have an SSIS package do it with a script task. Its a lot less painful. A lot of the same code in the SSIS package but easier to get running..

    CEWII

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply