How To Invoke Code Within A Web App That Isn't Externally Open
Sep 3, 2010
for example, you are caching data within your ASP.NET web app that isn't often updated. You have another process running outside of the app which ocassionally updates this data, when you do this you would like the cached data to be cleared immediately so that the next request picks up the new data straight away.The caching service is running in the context of your web app and not externally - what is a good method of calling into the web app to get it to update the cache?
You could of course, just hack a page or web service together called ClearTheCache that does it. This can then be called by your other process. Of course you don't want this process to be externally useable or visible on your web app, so perhaps you could then check that incoming requests to this page are calling localhost, if not throw a 404. Is this acceptable? Could this be spoofed at all (for instance if you used HttpApplication.Request.Url.Host)?
I can think of many different ways to go about this, mainly revolving around creating a page or web service and limiting requests to it somehow, but I'm not sure any are particularly elegant. Neither do I like the idea of the web app routinely polling out to another service to check if it needs to execute something, I'd really like a PUSH solution.Note: The caching scenario is just an example, I could use out-of-process caching here if needed. The question is really concentrating on invoking code, for any given reason, within a web app externally but in a controlled context.
View 2 Replies
Similar Messages:
May 18, 2010
in a form i have a buttoin, when click both OnclientClick and postback should happen. on clicking the "Email" button a client side "mailto" tag should do the work and pull a new message window on the client's machine.
whereas, the email addresses should be invoked by the post back. so , when clicking the button the server side post should happen and on return the client side script should be invokded with the values read during post back, and populate all the email addresses.
i need know how to first do a server hit take the values and then execute the client script with those values without using AJAX
View 1 Replies
Nov 15, 2010
My webserver stop working. It gives time out error. There is nothing in the event viewer.
If I access the web app on the web server using [URL], it works fine. Also the html pages have no problem. Just the asp.net web applications.
View 2 Replies
Jan 11, 2010
I couldn't think of a decent title, so let me first apologize for that. I have a WebService (call it A) written for my app so I can take advantage of ASP.NET 3.5 AJAX features. I use the generated JavaScript proxy to make AJAX calls.As a side effect, WebService A is exposed for anyone to add as a reference to another project, which is great, except I don't want certain WebMethods to be available to external applications (in the same domain, BTW).So I've got two questions:Is there a way to control the exposure of WebMethods in WebService A?
If there isn't, I'm thinking I'll just add a separate WebService (B) that exposes the WebMethods I need from WebService A. But then,How can I prevent other applications from referencing WebService A while still allowing the application it originates in to access it?If that's not possible, I'm not really worried about it. The apps are all intranet-only, I just don't want the WebServices to be abused.Also, there is a similar question here already without any good anwers. The asker describes almost the same situation I'm in: [URL]
View 4 Replies
Sep 13, 2010
We are currently developing an ASP.NET MVC application which will be deployed on a corporate intranet, with a slightly-modified customer facing version available on the public internet.We're making use of a number of external javascript libraries (e.g. jQuery) and a discussion has come up regarding referencing the libraries - should we reference them from an external source (e.g. via the Google load jQuery method) or keep our own version locally and reference from there?The project manager is a little concerned about having a 'dependency' on Google (or whoever) if we reference from there, and thinks that having our own copy of the library makes us more independent. On the other hand, I have heard there are a number of advantages to letting someone else host the library - for example, they handle versioning for us, Google aren't going anywhere anytime soon...
(for the purpose of the discussion assume the intranet we're hosting on has external access - obviously if it turns out it doesn't the decision is very much made for us!)So. Does this matter? And if so, what should we do and why?(I appreciate this is subjective - but it would be very useful to get advice from anyone with experience or thoughts on the matter. Not sure if this is a candidate for community wiki or not, let me know if I should have put it there and I'll know for future!)
View 5 Replies
Nov 18, 2010
I need to make the connection string in my vb.net web application be passed into the app externally. This is so I can re-driect the app to use either a test or production database. The same idea as a .INI file in a windows base system. someone suggested to me I use XML but I dont know how to do that.
View 13 Replies
Nov 25, 2010
I have a config file linked from web.config e.g.<features configSource="feature.config" />When I make changes to the "feature.config" file the IIS application appears to restart, is this expected behaviour?
View 1 Replies
Jul 29, 2010
VWD 2008 Express. Visual Basic. IE8.
I have some javascript that loads a new page for me after a video completes. I know how to load the page over (on the same page as) the current page. I also know how to create a "pop-up" window. The two lines below do this in the order mentioned. How can I code the script to make the new page load in a new tab in IE8 rather than over the current page or as a pop-up?
window.open("oneday/default.aspx","",
"height=800, width=800, scrollbars=1");
window.location.href = "http://www.goodnewsjail.org/oneday/default.aspx";
View 2 Replies
Sep 14, 2010
I did a little research and all i can find is binding the js to a control that will fire the popup.Is there a way that i can use in code so i can trigger a popup window from vb.net code? If it is to complicated then is there a way to have a button set with the popup message i want the user to view and make the button click with .net code so the onclick event will fire and show the popup window?
View 13 Replies
Jan 26, 2010
From Service method return me:
String FileName,
Byte[] FileData,
string FileType( includes: doc, pdf, tif, tiff, gif, jpg, jpeg, png, bmp, wpd)
How can I generate a file based on filetype and show it to user in browser?
View 2 Replies
Jan 22, 2010
i been looking for a simple asp.net forum .([URL]) I been googleing for atleast 10 hours. i want the forum to use asp.net c# sql 2005
View 6 Replies
Jan 27, 2011
is any code related to .NET/ASP.NET or BCL open source? If so where can this be downloaded?
View 8 Replies
May 15, 2010
I want to pass these properties:
width=800,height=800,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,s tatus=no,left=50,top=0
following two lines i am using with aspx / vb.net codebehind side to open a new browser window: want to pass above properties, is it possible?
Dim url As String = Session("gDocScanURL") & "ScanDocument.aspx?XYFileDocID=" & iDocID & ""
Response.Write("<script>var w=window.open('" + url + "'); w.focus();</script>")
View 3 Replies
Feb 9, 2010
I have a website 1 developed in .NET. It supports IE browser only. I have another website which runs in Safari browser. Now we have to re-direct to this Website 2 from website 1. WebSite 2 has to open in Safari only. Can i open a different browser from .NET code. JScript Window.Open() would open in default browser. How can i mimic 'open with' option?
View 1 Replies
Jan 8, 2010
Supporting an application and I have never seen any link building like this, tried what I know. Whaty I need to do is open this link in a new window.
addLink("Program Help", "Program help.", "tdHelp", "http://sharepoint/JFHQ/JSTAFF/J1/Internal/J13/SAD%20Application%20Help/Home.aspx")
View 7 Replies
Mar 19, 2011
I need to build a Q&A module for a .net site. I need it to integrate with our .net membership system. We are happy to pay for it... but all I have found so far is php code and the QHub hosted system, which would be a problem to integrate with out members.
View 6 Replies
Feb 13, 2011
In some crucial projects I relelized that time is one of the biggest concern while developing a project, specially a web application. I specifically about ASP.NET, does any Open Source tools exists for generating code for helping developers [like codesmith] to work smarter rather than work harder?
View 2 Replies
Jun 7, 2010
How can I open a new web page from C# code behind?
View 11 Replies
Mar 24, 2010
In an ASP.NET web application using C#, when we double click on design it will go to code behind page (cs file), but problem here is, when we double click on design its going to script of source file. Why it is happening?
View 1 Replies
Sep 13, 2010
I have a variable, which contains a whole web page. Is there a way to open a new browser window and set the contents of this variable as the page? I don't mind if it's javascript, but it has to be able to hold a bit of data if this is the case.
View 6 Replies
Jan 3, 2011
I'd need to open a new window from the code behind. I've seen the following code suggested, but I'm not clear on how to use it?
[Code]....
What controls do I need to add to the page? How is it fired?
View 1 Replies
Oct 23, 2010
Is it available to open jquery Dialog Server Side From Behind Code in asp.net?Please give me an example or a link for more information.
View 1 Replies
Jun 22, 2010
I have a function that sends out emails when certain processes are complete. The function works great; however, in our testing lab, I want to be able to see the message that are going out and not have it actually send the messages. Since MsgBox does not work in the web environment, is there a way to open a new page/window from the common code? The page will have the message passed to it for display and I do not want to do a redirect as there are times when more than one email is going out.
View 2 Replies
Mar 7, 2011
How Can I open Ajax Modal Pop up without Using Target Control Popup Event.. i want to open it by Code Condition in .CS ..... so how can i handle that
View 4 Replies
Feb 12, 2010
I need to implement a "preview" functionality where people make changes to a form, click a button and a pop-up window displays the preview while the original form retains the user's changes in the various <textarea's. Right now, the preview is working, but when they come back to the form, their changes are gone, the page has refreshed. How do I prevent the page from refreshing? I need to go to the server to get the URL to the preview page.
View 6 Replies