Url.Content on Azure

I have an ASP.NET MVC 2 application that has page with a link to a pdf file
<a href="<%= Url.Content("~/Downloads/test1.pdf") %>">test1</a>
Downloads directory is at MVCApplication1/Downloads
This works fine locally and on ISS, but returns a page not found when uploaded to Azure.

Hi,
Please check the below link as it has the same issue answered.
http://stackoverflow.com/questions/5076846/url-content-on-azure
Regards,
Mekh.

Similar Messages

  • Issue while playing the content of Azure Media Services after deleting the channel.

    Hi,
    We are having the issue while playing the content of Azure Media Services after deleting the channel.
    Please find detail scenarios below:
    We have done live streaming of an event using Azure Media Services, event was around 5-6 hrs. After completion of event channel was deleted, when we checked content data
    it was only 1hr. Content has only last 1 hr. recording, we are unable to get full recoding.
    We divided event into two parts to avoid above issue. After completion of 1st part which was of 2 hrs., we stopped the streaming and deleted the channel. New channel was
    created and streaming was started for 2<sup>nd</sup> part, after completion of event channel was deleted. Now we are unable to play the content data for 1st part but able to play the 2nd part of event through content publish URL.
    We have done streaming of 3 hrs. event on 18th April with same process and full recoding was available. 
    Can you let me know what might be the issue?

    Hi,
    Please refer to Justin’s blog and see if it helps:
    http://www.justinkobel.com/post/2012/04/30/SharePoint-2010-Claims%E2%80%93Operation-is-not-valid-due-to-the-current-state-of-the-object.aspx
    As suggested by Alex, please provide more information about your process of changing password.
    Here is an article for updating passwords on SharePoint 2010:
    http://blogs.technet.com/b/seanearp/archive/2011/01/25/updating-passwords-on-sharepoint-2010.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Retrieving an URL content in ABAP

    Hi Experts,
        I have to read the content of http://.......... URL content to ABAP. Is there any method or function module to read??
    Thanks and regards,
    Venkatraman.N.

    Hi!
    Take a look at the folliwing programms and examples:
    RSHTTP*
    They work really good.
    Best regards,
    Esteban

  • Retrieving URL content in ABAP

    Hi Experts,
        How can I retrieve the URL content of a website in ABAP.
        i.e., In a webpage if write click and press "View Source", the HTML source code will come. That source code I have to take with the aid of URL of the webpage. I know how to do this in Java & .NET. but I need in ABAP.
    Thanks and regards,
    Venkat

    Hi,
    check this.
    link:[Re: Generate SAP Portal URL in ABAP;
    hope u'll get some help.
    Regards,
    Sneha.

  • URL Content Rule with SSL

    Hi
    I have two different ssl services on the same servers. One service is published with standard 443 port and 444 port.
    I would like to balance those services with two different contents. They should have the same VIP address and the standard ssl port (443 tcp). Then, the difference between both contents would be the url.
    content 1
    url "//myserver.com/APL1/*"
    vip address 192.168.1.1
    port 443
    add service service1_443
    add service service2_443
    content 2
    url "//myserver.com/APL2/*"
    vip address 192.168.1.1
    port 443
    add service service1_444
    add service service2_444
    I've tried it but it doesn't work.
    Have I done anything wrong?
    Regards

    the main purpose of SSL is security.
    So, what is security ?
    Securit means you don't want other person/devices to see the content of your traffic.
    If nobody can see the content, this includes the CSS.
    So, the CSS is unable to see the URL which is part of the content.
    Your solution can't work.
    Unless you install an ssl module with the key of the server so the module can decrypt the traffic.
    Regards,
    Gilles.

  • EXC_BAD_ACCESS on device when getting URL contents

    Hi Guys
    I'm having an issue retrieving the contents of a URL, only when I am testing on the iPhone device itself.
    It works fine when I use the simulator but when testing on the device itself I get a EXC_BAD_ACCESS on the following line:
    NSString * example = [NSString stringWithContentsOfURL:nsURL];
    The device is a iPhone 4 with iOS 4.1
    Can someone please help as I have tried everything I can think of?
    Thanks in advance

    The error occurs when I call [NSString stringWithContentsOfURL:nsURL];
    The entire code is as follows:
    NSURL *nsURL = [NSURL URLWithString:@"http://www.mywebsite.com/xmlfeed.jsp"];
    NSString * example = [NSString stringWithContentsOfURL:nsURL];
    Only other thing I can add is that this code is running in a background thread when the app is launched and that the returned data is XML.
    I have also tried using TouchXML and the following line also has the same problem:
    CXMLDocument *xmlParser = [[[CXMLDocument alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.mywebsite.com/xmlfeed.jsp"] options:0 error:nil] autorelease];
    The strange thing is that both options work 100% of the time on the simulator. Could there be a flag or option I need to set to allow the app to communicate with the network connection?

  • Configuring folder structure for custom url contents

    Hi Experts,
    We are trying to create a custom help link similar to the standard help links provided by SAP (example:  http://help.sap.com/saphelp_xrpm400/helpdata/en/AD/815F4283F26255E100000000A155106/content.htm).
    Our custom help link should look like this: http://help.mycompany.com/xrpm450/en/AD/815F4283F26255E100000000A155106/content.htm
    To achieve this we are following a SAP FAQ Note: 991559
    Based on the solution provided in this note for Q.4 we have implemented the following steps:
    Proposed solution by SAP:
    Yes it is possible to configure custom help. For instance, the default xRPM help doc url for Item Details looks like this: http://help.sap.com/saphelp_xrpm400/helpdata/en/AD/815F4283F26255E100000000A155106/content.htm
    The value of "http://help.sap.com/saphelp_xrpm400/helpdata/" and
    "http://help.sap.com/saphelp_xrpm450/helpdata/" is maintained in property sheet of com.sap.xapps.cprxrpm.common.component.CommonComp. To change the value to custom url, please follow the steps:
    1. log in to J2EE Visual Administrator
    2. go to J2EE instance -> Server -> Services -> Configuration Adapter
    3. at right panel, click on webdynpro -> sap.com->xappscprxrpmcommon-> Components -> com.sap.xapps.cprxrpm.common.component.CommonComp -> Propertysheet.profile
    4. Open Propertysheet.profile, replace default value for SAP_HELP_URL with custom help url, such as http://help.mycompany.com/xrpm400/
    5. Set up required folder structure such as /en/AD/815F4283F26255E100000000A155106/, and create content.htm with your custom help content.
    Now the complete path for custom doc could be: http://help.mycompany.com/xrpm400/en/AD/815F4283F26255E100000000A155106/content.htm
    However, in the 5th point SAP has mention about creating a folder structure like /en/AD/815F4283F26255E100000000A155106/ . We created this folder. However, we cannot access this folder through http url.
    Please let me know if any extra configuration needs to be done after creating this folder structure.
    Thanks & regards,
    Sujit

    Hi Experts,
    We are trying to create a custom help link similar to the standard help links provided by SAP (example:  http://help.sap.com/saphelp_xrpm400/helpdata/en/AD/815F4283F26255E100000000A155106/content.htm).
    Our custom help link should look like this: http://help.mycompany.com/xrpm450/en/AD/815F4283F26255E100000000A155106/content.htm
    To achieve this we are following a SAP FAQ Note: 991559
    Based on the solution provided in this note for Q.4 we have implemented the following steps:
    Proposed solution by SAP:
    Yes it is possible to configure custom help. For instance, the default xRPM help doc url for Item Details looks like this: http://help.sap.com/saphelp_xrpm400/helpdata/en/AD/815F4283F26255E100000000A155106/content.htm
    The value of "http://help.sap.com/saphelp_xrpm400/helpdata/" and
    "http://help.sap.com/saphelp_xrpm450/helpdata/" is maintained in property sheet of com.sap.xapps.cprxrpm.common.component.CommonComp. To change the value to custom url, please follow the steps:
    1. log in to J2EE Visual Administrator
    2. go to J2EE instance -> Server -> Services -> Configuration Adapter
    3. at right panel, click on webdynpro -> sap.com->xappscprxrpmcommon-> Components -> com.sap.xapps.cprxrpm.common.component.CommonComp -> Propertysheet.profile
    4. Open Propertysheet.profile, replace default value for SAP_HELP_URL with custom help url, such as http://help.mycompany.com/xrpm400/
    5. Set up required folder structure such as /en/AD/815F4283F26255E100000000A155106/, and create content.htm with your custom help content.
    Now the complete path for custom doc could be: http://help.mycompany.com/xrpm400/en/AD/815F4283F26255E100000000A155106/content.htm
    However, in the 5th point SAP has mention about creating a folder structure like /en/AD/815F4283F26255E100000000A155106/ . We created this folder. However, we cannot access this folder through http url.
    Please let me know if any extra configuration needs to be done after creating this folder structure.
    Thanks & regards,
    Sujit

  • Caching URL contents

    I have a program that needs to download several large Jar files that contain resources. It would be nice if these could be cached locally so that I don't have to keep hitting my server. My Apache server is setting Expires info on my files to be 2 months after the access time, but no matter how many times I hit my server, I get a 200 OK message returned instead of a 304 Not Modified.
    I intend to eventually use this in a WebStart application. Can I have Java cache these files locally and only update them if the timestamp on the server changes? Without violating my sandbox?
    Mark McKay
    import java.net.*;
    import java.util.*;
    * @author kitfox
    public class URLTestMain
    /** Creates a new instance of NewMain */
    public URLTestMain()
    * @param args the command line arguments
    public static void main(String[] args)
    try
    URL url = new URL("http://www.kitfox.com/text/text.html");
    URLConnection conn = url.openConnection();
    System.err.println(conn.toString());
    System.err.printf("Content Encoding %s, Content length %d, Content type %s, Default use caches %b, Expiration %d, If ModifiedSince %d, Last MOdified %d, Use Caches %b\n\n",
    conn.getContentEncoding(), conn.getContentLength(), conn.getContentType(), conn.getDefaultUseCaches(),
    conn.getExpiration(), conn.getIfModifiedSince(), conn.getLastModified(), conn.getUseCaches()
    Map<String, List<String>> headers;
    System.err.println("Header Fields");
    headers = conn.getHeaderFields();
    for (String key: headers.keySet())
    List<String> list = headers.get(key);
    System.err.printf("Header '%s'\n", list);
    for (String ele: list)
    System.err.println("\t" + ele);
    //Download file
    Object obj = conn.getContent();
    catch (Exception e)
    e.printStackTrace();
    }

    Check the http documentation re: request headers. I've got a feeling there's a header or similar which says "only retrieve this document if modified".

  • HELP: URL content are different

    Hi All,
    I need some help for the below problem,
    1. I am accessing a URL to get the content. The format of URL is like 'http://...../download.wml?id=2259096114'
    2. This i have accessed from browser and using java program.
    3. While accessing from URL i am getting a WML file, this is i require, but while accessing from the java program i am getting some different content.
    4. The code is ,
    private static void printUrlContent(String u) throws Exception{
                    URL url= new URL(u);
                    URLConnection connection = url.openConnection();
                    connection.connect();
                    BufferedReader in = new BufferedReader(new  
                                                             InputStreamReader(connection.getInputStream()));
                    int i=-1;
                    while ((i = in.read()) != -1)
                            System.out.print((char)i);
                    in.close();
       }Please help me to understand why this is happinning and how to get the same content as i am accessing from browser.
    Thanks in advance.

    If you are sure that the URL is the same both times, the server might be sending back content based on a number of factors, the most like is what your application says it can accept (via the http accept header).
    What content do you get using Java?

  • IOS messages strips URL content from linked text sent from Messages Beta

    My guess is that this is an unexpected edge case in the iOS version of Messages, where pre-Messages beta it didn't have to worry about link embedded in text. But when I copy a URL from an application such as Reeder or drag and drop a URL from the Safari URL field into Messages in pastes in with underlined text of the title of the page the link is for, with the embeded link. When this link is recieved on iOS devices just the text of the page title is recieved, rendered without the embeded link. Which let me tell you left my wife wondering what I was trying to say to her more than once. Maybe this will is already resolved in a version of Messages yet to be released for iOS devices. 

    Ralph, yes, I am not denying if you highlight the url and copy and paste it into the text field in messages, you definitely get the full url, and iOS handles this case properly as it recognizes the URL.
    But if you click and hold on the favicon and drag away you get Blue text underlined like it was a clickable link, which it is. I did verify Firefox behaves the same way if you drag from the favicon.
    If you send the link like that (embeded url) and the reciever is Messages beta on another Mac, or over AIM, likely Gtalk (jabber) as well it is handled properly as a clickable link. If the reciver is on an iOS device, iOS does not handle this properly and strips the embeded url in the link.
    Below are images that illustrate
    Underlined in Red is the ghosted grab from the favicon, built in screen capture unable to grab my mouse pointer but it ends up over "messages" in the ghosted title with the green "+" indicator.
    Apologize for the size of this one, but that dragged URL dropped in a new message.
    How this message shows up on iOS devices.
    I know the workaround of copy and pasting the highlighted URL from the Safari URL field, but not all apps have this option, as I indicated Reeder for one when you are viewing an article there is a toolpar item to access several options for the article, one of them being copy URL - this must use the same method as Dragging and dropping from the Safari faviocn. Also many links that you bring up the contextual menu on in Safari and copy url end up pasting as embeded url links (Firefox does not do this). The workaround extends the workflow to open the article from a news feed in a browser, or click and load a link in Safari before the URL is exposed in the URL field before copy and pasting the url into messages, not very user friendly.
    I hope this helps clarify the case.

  • Redirect based on URL content

    Hi,
    I have received a request to forward traffic based on http header; specifically if the header contains www.sample.co.uk it should go to its regular serverfarm, if it contains www.sample.co.uk/wordpress it should go to a different serverfarm, probably containing a single server - the wordpress server.
    My first question is - is this even possible with the ACE? If so, does anyone have a sample config they could post here?
    Lastly although there are answers to similar questions before I do appreciate any help anyone can give me as I don't have much time on the ACE, and they are pretty critical to our company, i.e. I will be taken out the back and shot if I cause an outage.
    I can post detailed existing config if required.
    Best wishes
    Mike

    Hi Mike,
    Can't let you get shot then huh:)
    class-map match-all WWW-VIP
      2 match virtual-address 20.20.20.10 tcp eq www---->This 20.x.x.x should resolve to normal url
    class-map type http loadbalance match-any wordpress
      2 match http url /wordpress
    policy-map type loadbalance first-match SLB_LOGIC
      class wordpress
        serverfarm wordpress
      class class-default
        serverfarm WWW-FARM
    policy-map multi-match CLIENT_VIPS
      class WWW-VIP
        loadbalance vip inservice
        loadbalance policy SLB_LOGIC
        loadbalance vip icmp-reply
    Above configuration will ensure that www.sample.co.uk/wordpress goes to serverfarm wordpress and everything else is sent to WWW-FARM or whatever the farm(regular) you want it to go.
    Let me know if you have any questions.
    Regards,
    Kanwal
    Note: Please mark answers if they are helpful.

  • URL Content Download

    Hi
    i'd like to get data from an url... i used this code but doesn't works with all websites....
    public byte[] getData(String url) throws Exception {
    URL myUrl = new URL(url);
    URLConnection conn = myUrl.openConnection();
         byte[] urldata;
         byte[] tmpdata;
    URL_LENGTH = conn.getContentLength();
    // Some websites release a connection length equals to -1
         if(URL_LENGTH!=-1)
    urldata = new byte[URL_LENGTH];
    else urldata = new byte[100000];
         InputStream input = conn.getInputStream();
    // puts data in the array to return
         input.read(urldata);
         input.close();
    FileOutputStream f = new FileOutputStream(new File("/myFile.html"));
    f.write(urldata);
    f.close();
         return urldata;
    This code works only with a few of websites...does anyone can help me ?!?!
    PLease

    Here is a little class I use to copy files (either from the internet or from a hard drive). From the command line try:
    java UFile http://developer.java.sun.com temp.txt
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.URL;
    import java.net.URLConnection;
    public class UFile
         public static void main(String arg[])
          throws IOException
              InputStream is = getInputStream( arg[0] );
              OutputStream os = getOutputStream( arg[1] );
              System.out.println( UFile.copy(is, os) + " bytes copied" );
              System.exit(0);
         public static InputStream getInputStream(String fileName)
              throws IOException
              InputStream input;
              if (fileName.startsWith("http:"))
                   URL url = new URL( fileName );
                   URLConnection connection = url.openConnection();
                   input = connection.getInputStream();
              else
                   input = new FileInputStream( fileName );
              return input;
         public static OutputStream getOutputStream(String fileName)
              throws IOException
              return new FileOutputStream( fileName );
         public static int copy(InputStream in, OutputStream out)
              throws IOException
              int bytesCopied = 0;
              byte[] buffer = new byte[4096];
              int bytes;
              try
                   while ( (bytes = in.read( buffer )) != -1 )
                        out.write( buffer, 0, bytes );
                        bytesCopied += bytes;
              finally
                   in.close();
                   out.close();
              return bytesCopied;
    }If that doesn't help then take a look at this thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=331540

  • How to set the returned url contents

    I have a pageflow which talks to a remote servlet and get back the results and now i need to display the contents in <iframe>, Let me know how to pass the values back to the JSP

    Hello  Chao-Yi Wu,
    I don't have a real solution for you - just a few comments:
    1. At
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    I would add
            Try
                if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    2. At
       If pVal.ColUID = "col_0" Then
    I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
    and the 2nd not with "Else" but with "Else If ....."
    3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
    I always do it the same way as you in principle - I don't really know what the problem is.
    4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
    Sorry - that's all for the moment.
    Cheers,
    Roland

  • How to get URL content in a variable

    I want to load whole webpage in a variable like we do file_gets_contents in PHP. Any ideas???

    any ideas? yes.
    It's fundamental, just a few lines of code (plus some exception handling).

  • Getting Invalid URL error while creating the app even though it's returning valid content from browser.

    Hi ,
      i am trying add RSS section with URL http://api.foxnews.com/proxy/content/v2?sort=date desc&omitHeader=true&api_key=cc23011f-3ace-40a4-bb63-bfa654af5bc8&format=full-content-rss.xml&rows=20&q=content_type:article AND image_url:*
    AND section_path:fnc/entertainment , and it's giving invalid URL error. like @ Invalid Url, use http or https://[domain]. Please help what's going wrong with this URL content. 

    I've recently deployed an application in Websphere and HTTPServer and have Oracle on the DB back-end. Tim, apparently your login problem happens inside the Websphere. You will have a better chance to ask this question in IBM's forums.

Maybe you are looking for