Difference between site.allowunsafeupdates and web.allowunsafeupdates

What is the difference between web.allowunsafeupdates and site.allowunsafeupdates? I have seen that for some cases both are used and in other cases only web.allowunsafeupdates are used..Please tell me the exact difference ASAP.

Yes.But see i tried this code also..working..
 string filePath = string.Empty;
            if (SPContext.Current != null && SPContext.Current.Web != null)
                SPUser currentUserName = SPContext.Current.Web.CurrentUser;
                SPSecurity.RunWithElevatedPrivileges(delegate
                                                             using (SPSite spSite = new SPSite(GetRootSiteCollectionUrl()))
                                                                // spSite.AllowUnsafeUpdates = true;
                                                                 using (SPWeb spWeb = spSite.OpenWeb())
                                                                     spWeb.AllowUnsafeUpdates
= true;
                                                                     SPFolder list
= spWeb.GetFolder(spWeb.Url + AppConstants.ListUrl.ELC_MASS_USER_UPLOAD);
                                                                     SPFile document
= list.Files.Add(Guid.NewGuid().ToString() + bulkUserUploadDto.Name, bulkUserUploadDto.DocumentUploadedFileData, true);
                                                                     SPListItem listItem
= document.Item;
                                                                     SPFieldUrlValue
fieldUrl = new SPFieldUrlValue
                              Description = bulkUserUploadDto.WebTitle,
                              Url = bulkUserUploadDto.WebUrl
                                                                     listItem[AppConstants.Fields.AddUserToGroup.WEB_URL]
= fieldUrl;
                                                                     listItem[AppConstants.Fields.TITLE]
= bulkUserUploadDto.Name;
                                                                     listItem[AppConstants.Fields.AddUserToGroup.IS_REMOVE_EXISTING_USER]
= bulkUserUploadDto.IsRemoveExistingUser;
                                                                     listItem[AppConstants.Fields.AddUserToGroup.GROUP_TYPE]
= bulkUserUploadDto.DepartmentGroupType;
                                                                     listItem[AppConstants.Fields.AddUserToGroup.STATUS]
= AppEnums.JobStatus.New;
                                                                     listItem[AppConstants.Fields.AddUserToGroup.SITE_URL]
= bulkUserUploadDto.WebUrl;
                                                                     SPUser user =
spWeb.SiteUsers[currentUserName.LoginName];
                                                                     listItem[AppConstants.Fields.AddUserToGroup.UploadedBy]
= user;
                                                                     listItem.Update();
                                                                     filePath = document.Url;
                                                                     spWeb.AllowUnsafeUpdates
= false;
                                                                    // spSite.AllowUnsafeUpdates
= false;
            return filePath;
Here i didnt use SPcontext and still it works without that.. :(
Ankur garg

Similar Messages

  • What is difference between Site template and web template

    What is difference between Site template and web template

    Both are almost same, are you referring to Site Definitions vs web template?, if so, refer to the following post
    http://blogs.msdn.com/b/vesku/archive/2011/07/22/site-definitions-vs-web-templates.aspx. 
    --Cheers

  • RE:difference between application server and web application server

    hi,
         i am a fresher to SAP.please tell me the difference between application server and web application server so that my doubt will be clarified.

    Hi,
    the SAP Web Application Server is the reliable, open standard-based application server from SAP. It supports both J2EE and ABAP, and serves as the underlying infrastructure for all new and upcoming SAP solutions, like SAP R/3 Enterprise, SAP Portal, SAP Exchange Infrastructure, and all other SAP components.
    The SAP Web Application Server is not a new product, it is the natural evolution of proven SAP application server technology formerly known as SAP Basis. It provides the platform to develop, execute, and operate Web applications and Web services as well as traditional SAP GUI based applications
    if it helpful rewards points are appreciated

  • Differences between ITS based and web dynpro based ESS

    Hi all,
    What are the main differences between ( in functionality ) for ITS based and web dynpro based ESS.
    I know a few
    Underlying technology
    ITS ESS had inbox concept, where as web dynpro based ESS/MSS has UWL concept for approvals.
    The time statemment in ITS uses smart form while we can use Adobe document services for time statement in ESS 2004.
    Funcitonality
    There was not collective time approvals option In ITS ESS ( not even in ESS 2004 ) but ther is a collective time apporvals in ESS 2004s
    Am not pretty mich intrested in look and feel,  or the overview page concept but any additional functionality and a shift in the technology used.
    Please add.
    regards
    Sam
    Message was edited by:
            sameer chilama
    Message was edited by:
            sameer chilama
    Message was edited by:
            sameer chilama

    answered

  • Difference between BLOCK DATA and WEB ACCESS BLOCK?

    Currently my account shows I have both BLOCK DATA and WEB ACCESS BLOCK in place. I did this a couple of years to prevent data charges. Works perfectly. Now I'm trying to upgrade one of my lines to a Kin Onem because of the WiFi option and when I add the phone to my shopping cart and go to the Select Features & Services Page I see a message at the bottom that says: Features We Needed To Remove (Because they're incompatible with your phones or plan) - Block Web Access.
    It looks like I don't have a choice when ordering the phone, but what exactly will removing the Web Access block do? Maybe I have to turn it off anyway to use the WiFi anyway right? I just don't want to incur any data charges.
    Someone please help. Thank you!

    "Data block" actually blocks your phone's ability to connect to the 3g data network. What this means is your phone can't create an internet connection on a cellular network. Web Access block specifically blocks the browser/mobile web on your phone from making a connection. Unblocking mobile web will not cause your phone to be able to connect to the cellular data network (resulting in 1.99/mb charges), but will allow the browser on the kin to connect while you're using wifi.

  • Difference between apps server and web server...?

    hi,
    i would be grateful if anybody could list out around ten difference b/w web server and apps server,,,,,as i have presntation today afternoon...also i m not finding so many differances...anywayz ...lemme know if u know...
    Thanks in Advance.....
    nav

    Can it be that you are a little bit arrogant ?
    Why you don't simply use that little text field on the left side of this page or use a search engine ?
    One example:
    http://www.javaworld.com/javaqa/2002-08/01-qa-0823-appvswebserver_p.html

  • Netflix.ca catalog differences between Apple TV and Web

    If I access my Netflix.ca account via my new Apple TV, I get completely different catalog items than when I access it via my iPhone or laptop. I am using the same account name and password, same location, same wifi connection at my home in Vancouver, BC.
    One example: I can watch Leverage using my iPhone and laptop, but it's unavailable via my Apple TV.
    Netflix guy, could you please weigh in on this?

    Thanks Vazandrew. The problem was with Netflix -- their database had my IP Address identified as being in Dallas instead of Vancouver and therefore when I logged on via Apple TV or home wifi I was seeing the US catalog, not the Canadian one.

  • What are the differences between application server and webserver

    pls give the differences between application server and web server with examples

    Google.
    Example
    http://www.google.ca/search?hl=en&q=Do+your+own+damn+searching&meta=

  • Difference between a Search and a Retrieve web service?

    Anyone has any idea what's the difference between a Search and Retrieve web-services generated by the 7.1 WS Generator? It seems like you can use both to retrieve any kind of result definition and search by any field.
    I don't mind really, just curious if I'm missing something.
    Alon

    Googling led me to this:
    Authentication:
    Portal: You log-in to the site. Provides you with information based on who you are.
    e.g. mail.yahoo.com
    Website: No log-in.
    e.g. www.yahoo.com
    Personalization:     
    Portal: Limited, focused content. Eliminates the need to visit many different sites.
    e.g. you type in your user name and password and see your yahoo mail only.
    Website: Extensive, unfocused content written to accommodate anonymous users needs.
    Customization :
    Portal: You will select and organize the materials you want to access. Organized with the materials you want to access.
    Website: Searchable, but not customizable. All content is there for every visitor.
    e.g. you can navigate to yahoo mail, yahoo shopping, geo cities, yahoo group. If you wish to use any of these services you will either have to authenticate yourself and see things personalized to you or you can simply visit sections that are for everyone like yahoo news were if you are not signed in then the default sign in is guest.

  • (261680070) Q WWO-13 What are the difference between WLS6.1 and WLS7.0 web services?

    Q<WWO-13> What are the difference between WLS6.1 and WLS7.0 web services?
    A<WWO-13> The differences are huge, so different in fact that 6.1 web services cannot
    be deployed in 7.0. WLS7.0 and Workshop have much greater functionality than the
    limited stateless session (RPC-style) and JMS destination (MSG-style) approach of
    6.1. Workshop web services can interact with any type of EJB, any JMS destination
    as well as other web services and directly accessing databases. The framework for
    building the web service is better and more adaptable and Workshop provides a fully
    integrated develop, deploy, test and debug environment. Additionally, WLS7.0 have
    the capacity to be much better at performance since due to XML parser enhancements
    and the addition of XML maps.

    If you want to take existing WLS6.1 web services and convert them to WLS7.0 you can
    do so quite easily. The WLS7.0 Ant still supports wsgen so you do not need to even
    change your build.xml file. The generated web service however will be implemented
    is a manner compliant with the WLS7.0 environment. More details are at:
    http://e-docs.bea.com/wls/docs70/webServices/anttasks.html#1070576
    "Adam FitzGerald" <[email protected]> wrote:
    >
    Q<WWO-13> What are the difference between WLS6.1 and WLS7.0 web services?
    A<WWO-13> The differences are huge, so different in fact that 6.1 web services
    cannot
    be deployed in 7.0. WLS7.0 and Workshop have much greater functionality
    than the
    limited stateless session (RPC-style) and JMS destination (MSG-style) approach
    of
    6.1. Workshop web services can interact with any type of EJB, any JMS destination
    as well as other web services and directly accessing databases. The framework
    for
    building the web service is better and more adaptable and Workshop provides
    a fully
    integrated develop, deploy, test and debug environment. Additionally, WLS7.0
    have
    the capacity to be much better at performance since due to XML parser enhancements
    and the addition of XML maps.

  • What's the difference between SharePoint 2013 and Office 365 Team Sites?

    Hi there,
    What are the differences between SharePoint 2013 and Office 365 Team Sites?
    If I would like to develop a professional corporate website with SharePoint technology (because the company allready uses Office 365), do you recommend using SharePoint 2013 (in the cloud) or Office 365 Team Sites? And why?
    Thank you very much!

    You cannot make SPO Team Sites anonymous-enabled, therefor they're a moot point for a public website.
    While slightly out of date, take a look at this:
    http://nikpatel.net/2013/01/17/new-sharepoint-2013-wcm-features-are-not-available-in-sharepoint-online-2013/
    http://technet.microsoft.com/en-us/library/sharepoint-online-content-service-description.aspx
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Difference between using Java and Non-Java in Webi.

    Hi ,
    I have one more question requesting for an answer.
    Would like to know what is the Difference between using Java and Non-Java in Webi.
    Thank You in advance.
    Appana Ganesh.

    Hi,
    check the Information in following post, the differences are discussed there:
    http://scn.sap.com/thread/3295306
    best regards,
    Victor

  • What is difference between bex analyser and bex browser

    what is difference between bex analyser and bex browser . please explain what are use of both and what we do in both.

    hi
    Bex Browser
    The Business Explorer Browser (BEx Browser) makes it possible for you to access all document types of the Business Information Warehouse that are assigned to your role or that you have stored in your favorites. You can select and open documents assigned to you in the BEx Browser or store and manage new documents in the BEx Browser.
    Document types that you can work with in the BEx Browser are:
    · BW workbooks
    · Documents that are stored in the Business Document Service (BDS)
    · Links (references to file system, shortcuts)
    · Links to internet sites (URLs)
    · SAP transaction calls.
    · Web applications and Web templates
    · Crystal Reports
    Bex Analyser
    The Business Explorer Analyzer (BEx Analyzer) is the analysis and reporting tool of the Business Explorer that is embedded in Microsoft Excel.
    Features
    You can call up the BEx Query Designer in the BEx Analyzer, in order to define queries. Subsequently, you can analyze the selected InfoProvider data by navigation to the query created in the Query Designer and create different query views of the data. You can add the different query views for a query or for different queries to a work book and save them there. You can save the workbook in your favorites or in your role on the BW Server. You can also save the workbook locally on your computer.
    Beyond that, you can precalculate the workbook and distribute it by e-mail to recipeients or you can export it to the Enterprise Portal and make it accessible to other employees in the company.
    You can start queries in a standard view (with a Standard Web Template set up in Customizing) in the Web browser and forward the URL or continue to navigate on the Web. Similarly, you can export the Web query to MS Excel 2000.
    Overview of the Functional Area of the BEx Analyzer:
    ·        BEx toolbar
    You access the functions of the BEx Analyzer from the BEx toolbar, which takes you to the BEx Open dialog box where you can open existing queries, or to the BEx Query Designer where you can create new queries or change existing queries.
    ·        Evaluating Query Data
    The BEx Analyzer offers convenient functions for evaluating and presenting InfoProvider data interactively. In the BEx Analyzer, you can add queries to workbooks, navigate within them and refresh the data. You can also process the queries further in Microsoft Excel or display them in the Web browser in a default view.
    Navigation of a query allows you, for example, to filter characteristics on a single value, drilldown on all values for a characteristic, regroup characteristics and key figures in the rows and columns of the results area, or hide key figures. Navigation results in different views of the InfoProvider data. In addition, a range of further functions is available which allow you to edit a query interactively (for example, sorting, cumulated output, among others). In addition, you can use the editing functions in Microsoft Excel in order to set up individual format templates, to print results areas, or to create graphics.
    ·        Queries in Workbooks
    Queries are inserted into workbooks so you can display them. When you insert a query, a link is made between the cell areas of the worksheet and the data of the InfoProvider upon which the query is based. A link therefore exists between the Business Explorer and the Business Information Warehouse Server (BW Server).
    When inserting a query into the workbook, a VBA routine is automatically generated in the workbook. You can also connect the Business Explorer with your own VBA programs (Visual Basic for Applications).
    You can create workbook templates, into which you can insert your queries. Workbook templates can contain pre-determined items for the area of the query, formatting settings, logos, VBA macros, and so on.
    ·        Precalculating workbooks
    You can precalculate and distribute workbooks with the BEx Broadcaster, which is a Web application you get to form the BEx toolbar. The system generates MS Excel workbooks with historical data. You determine the time for precalculation yourself: You can have workbooks precalculated at a predefined time or they can be precalculated whenever data in the underlying InfoProvider changes. You can have the precalculated workbooks sent by e-mail or you can export them into the Enterprise Portal, where you can make them available to employees within your company.
    Activities
    To start the BEx Analyzer, choose Start ® Programs ® SAP Front-end Business Information Warehouse ® SAP Business Explorer Analyzer.
    You can also access the BEx Analyzer via SAP Easy Access ® SAP Business Information Warehouse ® SAP Menu ® Business Explorer ® Analyzer or in the Business Explorer Browser using the Business Explorer Analyzer symbol in the menu bar.
    Hope this will solve your issu
    nagarjuna

  • Difference between .jar, .war and .ear file

    Hi,
    I am pretty new to J2EE technology.
    I would like to know what is the difference between .jar, .war and .ear files and how they are deployed on webserver.
    Thanks,

    Files with a .jar extension or JAR files, are essentially just a collection of files compressed using the ZIP/ZLIB compression format.
    JAR (short for Java Archive) files were introduced in the early days of Java as a means to conveniently package and distribute Java applications and components. Since then, a number of additions to the Java platform have followed suit. The introduction of the EAR file is one such addition.
    An EAR (Enterprise Archive) file is a JAR file that contains a J2EE application.
    A J2EE application is a group of Web modules that collectively perform as a single entity.
    A Web Module is an entity consisting of one or more resources such as HTML files, Java class files, XML files, etc. Web Modules are packaged in Web Archive (WAR) files.
    Looking at it from a top-down view, EAR files contain JAR files and WAR files. Packaging resources in WAR files, JAR files and eventually EAR files, makes it easy to reuse and reassemble components as new J2EE applications and distribute them to new environments.
    For example, Tomcat deals only with WAR files.
    So, in order to auto-deploy a Web application to a Tomcat environment, you must place an application's WAR file in the appropriate directory or use Tomcat's deployment tools to manually deploy the file.
    If you already have an EAR file that contains the WAR file, you can extract the WAR file and use it as is. If you do not have the EAR file or the WAR file, you can use any number of compliant tools to create the WAR file. Tomcat is a servlet/JSP container available from the jakarta.apache.org site.

  • What is the difference between HTML DB and HTML DB Studio?

    What is the difference between HTML DB and HTML DB Studio?

    Doug,
    Oracle HTML DB is a feature of the Oracle 10g Database which allows you to quickly & securely create web applications based on your data in Oracle.
    Please see our homepage on OTN for more details: http://otn.oracle.com/htmldb
    Oracle HTML DB Studio is a site where you can download HTML DB applications, utilities & tip and tricks for use with HTML DB.
    Thanks,
    - Scott -

Maybe you are looking for

  • Error while checking in and storing: C:\Documents and setting*

    hI, I hace install the content server and i made content repository also. everything I made on development server, and the original application file is getting check in also. now when I tried to check in it in test sever, it giving me error like  Err

  • Text in line Item( SGTXT)

    Hi All Please suggest me regarding while running job for IR documents posting, but long text (SGTXT )is not updated for some documents. Everything is fine like reference number, assignment and additional data. << Moderator message - Everyone's proble

  • Tables used in sap plm

    hi all can somebody  give me <b>some imp. tables used in sap plm.[/b regards. subhasis.

  • Burning Two playlist with 2 optical drives IS possible!!!!!

    A few weeks ago I posted a question asking the benefits of a 2nd Optical Drive. I wanted to post the results of what I found. I added a Pioneer DVR-112B (Black). I removed the Bezel so that it would close properly and I removed the face plate to remo

  • Iterate through HashMap and .....

    Hi friends, I have a HashMap with say following entries.. (ad_key1 , value1) (ad_key2 , value2) (ad_key3 , value3) (ad_key4 , value4) (hk_key1 , value1) (hk_key2 , value2) (hk_key3 , value3) (hk_key4 , value4) Now my requirement is that i have to ite