How to provide host string
hi i am using oracle client, my server is at some other location
user:
pass:
host string:
i have server database username,password,ip address, port number and database name
how can i connect to my oracle database.
Regards
Naren
Narendar.Vishwanatham wrote:
i would like to connect from sql plusExample:
/home/billy> sqlplus scott/tigerg@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=196.1.83.32)(PORT=1521))(CONNECT_DATA=(SID=ora)(SERVER=DEDICATED)))"
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 28 13:26:01 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL>Or if you have a tnsnames.ora file configured (and +$TNS_ADMIN+ or +$ORACLE_HOME+ set), you can use the alias for such a connection string, as oppose to the string itself.
Similar Messages
-
How can provider-hosted app accessible to anonymous users online
Hi,
I am new SharePoint and still learning it.
I have created a Provider Hosted App. built in asp.net Web application. This apps retrieve all file to shared documents of sharepoint online using REST API. it's access only register user.
The problem is that how can accessed this apps through anonymous user.
I am not sure what is the best way to do this.
Thanks
KrishnaHi Krishna,
check those URLs
http://www.sharepoint-journey.com/how-to-enable-anonymous-access-in-sharepoint-2013.html
https://support.cloudshare.com/hc/en-us/articles/200701115-How-to-Enable-Anonymous-Access-to-a-SharePoint-2013-site
Also to create the App to allow anonymous check the following link
http://msdn.microsoft.com/en-us/library/office/dn579415(v=office.15).aspx
Kind Regards,
John Naguib
Technical Consultant/Architect
MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation
Please remember to mark your question as answered if this solves your problem -
How to set another instance of same live app as test app sharepoint 2013 provider hosted
Hi
I have SharePoint 2013 provider hosted app published in azure now i need to deploy another instance on same app as separate app for testing purposes, i have created another site in azure and done all profile adding packaging the app with visual studio to
deploy .App file to SharePoint catalog. problem is that .app file is same name and when i going to add, it replace with same version witch deploy as live instance.
Any one can give solution how to handle this greatly appreciated ...
Kind Regards
RadikaHi Radika,
According to your description, there is already an app deployed in your site, you want to deploy another instance of it to the same site for testing purpose.
As a common practice, when developing an app, for not overriding the previous version, it is recommended to create another project for testing used only with another
name.
By doing this, we can keep the development in the testing project, when it is done, migrate the newly customization to the original project and deploy it with a new
version number.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
contact [email protected]
Patrick Liang
TechNet Community Support -
How to debug sharepoint 2013 provider hosted app?
We developed SharePoint 2013 provider hosted app using MVC 5 Entity Framework of Database first and publish in Windows Azure site as well as deployed that project to our SharePoint app Catalog. We need to change Windows azure site so we
changed to publish in another Windows Azure site and deployed again to our SharePoint app Catalog. No problem the app is working after we changed Windows Azure site. I am new of this technology I faced so hard of changed
existing Windows Azure site to New Windows Azure site. Please tell me how to debug the SharePoint Provider hosted app? Please tell me step by step process.
Thanks in Advance.Hi,
According to your description, you might want to know how to debug provider hosted app.
To get a quick start, I would suggest you take a look at the link below about
Debugging SharePoint Apps That Are Hosted In Windows Azure Web Sites:
http://blogs.technet.com/b/speschka/archive/2013/11/25/debugging-sharepoint-apps-that-are-hosted-in-windows-azure-web-sites.aspx
Another two similar articles for your reference:
http://sharepointfieldnotes.blogspot.jp/2013/03/making-it-easy-to-develop-and-debug.html
http://blogs.msdn.com/b/officeapps/archive/2013/01/03/debugging-remote-event-receivers-with-visual-studio.aspx
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
How to get the current user name in Provider hosted app using appOnlyAccessToken
Hi,
Please help me, how to get the HostWeb UserName in Provider Hosted App
i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
Below code does not return current user who Log in in hostweb, it is returning
SharePoint App (app@sharepoint)
Web web = clientContext.Web;
clientContext.Load(web);
clientContext.ExecuteQuery();
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
clientContext.Web.CurrentUser.LoginName;
Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
app prompts for credentials
HttpContext.Current.User.Identity.Name
Thanks
RamHi,
Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
then
Web web = clientContext.Web;
clientContext.Load(web);
clientContext.ExecuteQuery();
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
clientContext.Web.CurrentUser.LoginName;will return proper user Name.
HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
HOW CAN I GET USERNAME,PASSWORD,HOST STRING?
I have installed oracle 9i personal edition, when i tried to open sql plus, i was asked to fill username,password and host string. When i type anything it shows error message ora-12154.Is anyone can help me? Thanks
The error you gave can appear for lots of reasons.
You don't give any information about how the install
went - did you check the logs for errors? Have you
shut the machine down since you did the install?
Are you actually running SQL*Plus on the same machine
as the database? Is your database running? Can you
connect using "/ as sysdba"? What hints that even
a simple google search gives did you try?
-- CJ -
How can I add my Host String in the Registry?
Hi everybody,
I know there's a way to add the Host String in the Registry, but I don't remember how to do it? Can anyone please help me. I want to do this because every time I log in I just want to type the username and password and not the Host String because is a little bit long for me and the users when they open a form to type data.
Help me please!Dear User,
Instead of Using Registery Side ,
you should use log-on trigger. This is form level trigger.
logon('username','passard@hoststring').
if would go for registry then You have change in registry for each user while the above solution does not need
such changes.
Thanks and Regards
Manish Tiwari -
How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?
I wish to retrieve sharepoint online data in html page (hosted in windows azure) using javascript and then need to play with AngularJSHi,
According to your description, you might want to get data from Office 365 SharePoint Online(also known as host web) and pass to the Provider Hosted App which is hosted
in Windows Azure site.
I would suggest you take a look at the links below about accessing data from the host web
for a quick start:
https://msdn.microsoft.com/en-us/library/office/fp179927(v=office.15).aspx#SP15Accessdatafromremoteapp_Codeexample
http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
Aother sample solution for your reference:
https://code.msdn.microsoft.com/SharePoint-2013-Get-the-0ec36bb6
Best regards
Patrick Liang
TechNet Community Support -
How To get SharePoint logedin user email in provider hosted app
Hi
I am using Amazon cloud to host my provider hosted app. App is developed using chrome control and app is registered in SharePoint Online.
can any one explain how to get email Id of logged in user in SharePoint online from provider hosted App.
Regards
KapsHi,
Please refer to the following article it has complete information how to get user details.
How to: Get user identity and properties in SharePoint 2013
Using PeopleManager, we can get the emailID.
PeopleManager peopleManager = new PeopleManager(clientContext);
PersonProperties personDetails = peopleManager.GetMyProperties();
clientContext.Load(personDetails, personsD => personsD.AccountName, personsD => personsD.Email, personsD => personsD.DisplayName);
clientContext.ExecuteQuery();
Please mark it answered, if your problem resolved. -
How to Use Office 365 api in Provider Hosted App
Hi,
I want to use outlook api in SharePoint Provider Hosted App.
when I use :-
$.ajax({
url: 'https://outlook.office365.com/api/v1.0/me/contacts',
type: 'GET',
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', 'Bearer');
Accept: "application/json",
"client-request-id": "9de3d763-a8d9-4433-92f3-096d6be36d86",
success: function () {
alert("Welcome to Outlook ")},
error: function (e) {
alert(' Error121212 :' +e);
Error:-
XMLHttpRequest cannot load https://outlook.office365.com/api/v1.0/me/contacts. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:44309' is therefore not allowed access. The response had HTTP status code
401.
Please Provide me a good example.
Thanks in AdvanceHi SharePlus,
You probably want to use the Office 365 API's to authenticate and communicate with the API's.
There's several resources available for this:
Ultimate LinkRoll for Getting Started with the Office 365 API's
Download Office 365 API Tools for Visual Studio 2013
Getting Started with O365 Dev - Communicate with Exchange
If you don't want to use the pre-compiled typed objects in the Office 365 API's for communicating with the Mail service (Exchange), you can always just make sure to handle the authentication properly and then construct your queries as raw queries, like Chaks
describes here: http://chakkaradeep.com/index.php/working-with-office365apis-the-raw-version/
Also, as a general rule; When working with anything Office 365, you should always keep an eye out for the example code, articles and news published from the Office 365 Patterns & Practices team here: https://github.com/OfficeDev/PnP
I hope this will guide you in the right direction :-)
Tobias Zimmergren
Microsoft MCP, MCTS, MCT, MVP (SharePoint)
Blog: www.zimmergren.net
Twitter: twitter.com/zimmergren
Corporate site: www.tozit.com -
How to identify the host string in Oracle on Unix
Help me out to identify the SID in Unix. When I try to connect scott/tiger@mydatabase, it results in error, previously I used to access. When I try connecting scott/tiger without host string it connects. Please help me out finding the host string. Working on Unix.
Thank you.echo $ORACLE_SID on the UNIX shell, this will tell you the sid that you are connecting to. you want to change the connect string
say
ORACLE_SID=<new_sid> then use sqlplus you will get connected to newsid. -
Hello,
I'm attempting to get a SharePoint 2013 Provider Hosted Application working in a brand new SharePoint environment. I've created snapshots of both my dev and the sharepoint environments along the way and have meticulously documented every step of the
way. I've followed these instructions (among many other resources found along this journey) :
http://msdn.microsoft.com/en-us/library/fp179923(office.15).aspx
http://technet.microsoft.com/en-us/library/fp161236(office.15).aspx
http://msdn.microsoft.com/library/office/fp179901%28v=office.15%29
Upon package and publish of my application to SharePoint, I get a 401 Unauthorized error. I use Fiddler to obtain the SPErrorCorrelationID to ultimately obtain the following ULS Viewer Output. Please explain how to fix if you're able.
Please Note: I was under the impression that a Provider Hosted Application does not use the Azure Access Control service, so I'm confused as to why my system is attempting to make this connection?
Also Note: I've used a self signed and godday obtained certificate to successfully f5 debug my basic web.title (out of the visual studio 2012 box) sharepoint provider hosted application... so I know my certs are good.
Here's my ULS output:
03/24/2014 08:54:47.83 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://portal.cltenet.com/_layouts/15/appredirect.aspx?instance_id=22d5252f%2D392c%2D4f68%2Db820%2Da3053b9d4f24)
306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.83 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation Authentication Authorization agb9s Medium Non-OAuth request.
IsAuthenticated=True, UserIdentityName=0#.w|cltenet\sp.apps, ClaimsCount=25 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.83 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.84 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Deployment acjjg Medium The current user has System.Threading.Thread.CurrentPrincipal.Identity.Name
= 0#.w|cltenet\sp.apps, System.Security.Principal.WindowsIdentity.GetCurrent().Name = NT AUTHORITY\IUSR, System.Web.HttpContext.Current.User.Identity.Name = 0#.w|cltenet\sp.apps. 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.84 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsrv Medium redirectLaunUrl after getting it from query
string, web or app instance: https://hightrust31.cltenetapps.com/Pages/Default.aspx?{StandardTokens} 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation General aib0n High trying to get app tokens for site: 888b71f7-51ee-40f5-8344-8de4869d37d0
Unable to load app tokens from appInstanceId: 22d5252f-392c-4f68-b820-a3053b9d4f24 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsrw Medium redirectLaunUrl after getting token replacement:
https://hightrust31.cltenetapps.com/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fportal%2Ecltenet%2Ecom&SPLanguage=en%2DUS&SPClientTag=0&SPProductNumber=15%2E0%2E4420%2E1017 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsry Medium m_oauthAppId after NormalizeAppIdentifier()
i:0i.t|ms.sp.ext|[email protected]8df36d5d. Now getting app principal info. 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsr0 Medium decided that we need to do a POST to the
app. 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsr1 Medium m_redirectMessage: EndpointAuthorityMatches
306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsr2 Medium realm matched attempting to get app token
using GetAccessToken() 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth advzm High Error when get token for app i:0i.t|ms.sp.ext|[email protected]8df36d5d,
exception: Microsoft.SharePoint.SPException: The Azure Access Control service is unavailable. at Microsoft.SharePoint.ApplicationServices.SPApplicationContext.GetApplicationSecurityTokenServicesUri(SPServiceContext serviceContext)
at Microsoft.SharePoint.ApplicationServices.SPApplicationContext..ctor(SPServiceContext serviceContext, SPIdentityContext userIdentity, OAuth2EndpointIdentity applicationEndPoint) at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext
userIdentityContext, String applicationId, Uri applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue) at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenPrivate(SPServiceContext
serviceContext, String appId, Uri appEndpointUrl, SPAppPrincipalInfo appPrincipal, SPApplicationContextAccessTokenType tokenType, Boolean useThreadIdentity, SPUserToken userToken) 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth ajsr3 High App token requested from appredirect.aspx
for site: 888b71f7-51ee-40f5-8344-8de4869d37d0 but there was an error in generating it. This may be a case when we do not need a token or when the app principal was not properly set up. LaunchUrl:https://hightrust31.cltenetapps.com/Pages/Default.aspx?SPHostUrl=http://portal.cltenet.com&SPLanguage=en-US&SPClientTag=0&SPProductNumber=15.0.4420.1017
Exception Message:The Azure Access Control service is unavailable. Stacktrace: at Microsoft.SharePoint.ApplicationServices.SPApplicationContext.GetApplicationSecurityTokenServicesUri(SPServiceContext serviceContext)
at Microsoft.SharePoint.ApplicationServices.SPApplicationContext..ctor(SPServiceContext serviceContext, SPIdentityContext userIdentity, OAuth2EndpointIdentity applicationEndPoint) at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext
userIdentityContext, String applicationId, Uri applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue) at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenPrivate(SPServiceContext
serviceContext, String appId, Uri appEndpointUrl, SPAppPrincipalInfo appPrincipal, SPApplicationContextAccessTokenType tokenType, Boolean useThreadIdentity, SPUserToken userToken) at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenFromThreadIdentityOrUserToken(SPServiceContext
serviceContext, String appId, Uri appEndpointUrl, SPApplicationContextAccessTokenType tokenType, SPAppPrincipalInfo appPrincipal, Boolean useThreadIdentity, SPUserToken userToken) at Microsoft.SharePoint.ApplicationPages.AppRedirectPage.ValidateAndProcessRequest().
Since this is a nonfatal error, it will be sanitized and posted to the app as part of the app launch. 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation General ajlz0 High Getting Error Message for Exception Microsoft.SharePoint.SPException:
The Azure Access Control service is unavailable. at Microsoft.SharePoint.ApplicationServices.SPApplicationContext.GetApplicationSecurityTokenServicesUri(SPServiceContext serviceContext) at Microsoft.SharePoint.ApplicationServices.SPApplicationContext..ctor(SPServiceContext
serviceContext, SPIdentityContext userIdentity, OAuth2EndpointIdentity applicationEndPoint) at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext userIdentityContext, String applicationId, Uri
applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue) at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenPrivate(SPServiceContext serviceContext,
String appId, Uri appEndpointUrl, SPAppPrincipalInfo appPrincipal, SPApplicationContextAccessTokenType tokenType, Boolean useThreadIdentity, SPUserToken userToken) at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenFromThreadIdentityOrUserToken(SPServiceContext
serviceContext, String appId, Uri appEndpointUrl, SPApplicationContextAccessTokenType tokenType, SPAppPrincipalInfo appPrincipal, Boolean useThreadIdentity, SPUserToken userToken) at Microsoft.SharePoint.ApplicationPages.AppRedirectPage.ValidateAndProcessRequest()
306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation App Auth aib0p Medium Doing appredirect from appredirect.aspx:
in site: 888b71f7-51ee-40f5-8344-8de4869d37d0 with RedirectLaunchUrl: https://hightrust31.cltenetapps.com/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fportal%2Ecltenet%2Ecom&SPLanguage=en%2DUS&SPClientTag=0&SPProductNumber=15%2E0%2E4420%2E1017
306c809c-66a1-d0d5-d8e2-89d3631ce1bf
03/24/2014 08:54:47.85 w3wp.exe (0x1448) 0x22D8 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://portal.cltenet.com/_layouts/15/appredirect.aspx?instance_id=22d5252f%2D392c%2D4f68%2Db820%2Da3053b9d4f24)).
Execution Time=26.5933938531294 306c809c-66a1-d0d5-d8e2-89d3631ce1bf
Your help is very much appreciated.
With Respect,
LarryYes, actually - I was able to resolve it.
However I don't know how, unfortunately. I suspect it was because I needed to have the names of the certificates, defined during the certificate registration (to sharepoint) process, different.
I have a complete document that shows step by step instructions on the exact process I took to complete the provider hosted application creation, deployment and publishing. It was a daunting task, but I finished it successfully.
If there's a way to send private message on this forum, please do so and I'll respond with a way to obtain my document.
NOTE: I'm not all impressed with the way this forum works. This is supposed to be a Microsoft resource and I'll be damned if I ever get a response to highly technical questions. Completely lame. Boooooo Microsoft. -
Hello all,
Could you possibly help me with provider-hosted app development/deployment process.
We developed SharePoint provider-hosted app that works just fine in development environment. Now we need to automate it's installation in test environment via powershell.
In AppManifest.xml that we are deploying we have key instead of explicit URL:
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="ShowAllRoomsApp" ProductID="{922a18aa-5592-b59a-4da9-4791baef02e7}" Version="1.0.0.0"
SharePointMinVersion="15.0.0.0">
<Properties>
<Title>SomeTitle</Title>
<StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
If we use as
https://technet.microsoft.com/en-us/library/jj655398.aspx recommends, we cannot specify Redirect Url as we can do this on
/_layouts/appinv.aspx
So now it seems like the only way to deploy this kind of solution is using appinv.aspx page.Or must we apply this URL in AppManifest on developing stage in Visual Studio?
What did I miss?
P. S. Even if I use /_layouts/appinv.aspx after powershell commandlets, I get error.hi,
to deploy provider hosted app you need 2 things
1. Client ID
2. Redirect URL.
What you can do you can generate app from visual studio using clientID and URL from developer enviornment.
Now a app file is just a simple compressed zip file if you rename it as .zip and extract you will find AppManifest
inside it. So to create an app for Testing enviornment what you have to to Get the CLient ID (from AppRegNew.aspx) in testing enviornment. Unzip .App file change the AppManifest with testing client ID and URL than again zip file and rename as .app.
Now if you upload this file it will work.
To automate this scenerio i have created a simple windows Application in which i Pass the Client ID and StartURl and an App File it unzips the app file make changes to app and again zip it.
public static class AppPackageHelper
public const string StartUrlExpression = "{0}?{1}";
public const string StandardToken = "{StandardTokens}";
public static string Publish(string appPath, string ClientId,string StartUrl)
string tempDir = string.Empty;
string outPutFile = string.Empty;
try
string parentDir = System.IO.Path.GetDirectoryName(appPath);
outPutFile = System.IO.Path.Combine(parentDir, ClientId + "-Winshuttle.app");
tempDir = System.IO.Path.Combine(parentDir, ClientId.ToString());
Directory.CreateDirectory(tempDir);
int lastInd = appPath.LastIndexOf('.');
string tempPath = string.Empty;
string targetFilePath = string.Empty;
string cabPath = System.IO.Path.Combine(tempDir, System.IO.Path.GetFileNameWithoutExtension(appPath) + ".cab");
FileInfo fInfo = new FileInfo(appPath) { IsReadOnly = false };
File.Copy(appPath, cabPath);
XDocument doc = null;
string appManifest = string.Empty;
using (ZipArchive zipArch = ZipFile.Open(cabPath, ZipArchiveMode.Update))
appManifest = string.Format(@"{0}\AppManifest.xml", Directory.GetParent(cabPath).FullName);
ZipArchiveEntry manifestEntry = zipArch.Entries.LastOrDefault(e => e.Name.ToLower() == "appmanifest.xml");
manifestEntry.ExtractToFile(appManifest);
doc = XDocument.Load(appManifest);
XNamespace ns = doc.Root.GetDefaultNamespace();
string defaultUrl = string.Format(StartUrlExpression, StartUrl.TrimEnd('/'), StandardToken);
doc.Descendants(XName.Get("StartPage", ns.NamespaceName)).First().Value = defaultUrl;
doc.Descendants(XName.Get("RemoteWebApplication", ns.NamespaceName)).First().Attribute(XName.Get("ClientId")).Value = setupInfo.ClientId.ToString();
doc.Save(appManifest);
if (manifestEntry != null)
manifestEntry.Delete();
zipArch.CreateEntryFromFile(appManifest, "AppManifest.xml");
int totEnt = zipArch.Entries.Count;
for (int e = 0; e < totEnt; e++)
if (zipArch.Entries[e].Open().Length == 0)
//if (zipArch.Entries.Count > totEnt && e >= totEnt) break;
//zipArch.CreateEntry(zipArch.Entries[e].FullName);
File.Delete(appManifest);
if (File.Exists(outPutFile))
File.Delete(outPutFile);
File.Move(cabPath, outPutFile);
return outPutFile;
catch
throw;
finally
if (System.IO.Directory.Exists(tempDir))
System.IO.Directory.Delete(tempDir, true);
return outPutFile;
using System.IO.Compression.FileSystem.dll.
Also if you want to do it using powershell You need to do the same thing unzip-> changes values-> zip
So basic thing is You need to ahve only valid AppManifest file which contains 2 valid values Client Id and StartUrl
if you changes it inside appmanifest manuall than it will also work. Using above code you can create a console Application to do it. You can use powershell it just that i dont know how to zip unzip in powershell but i am pretty sure you can easily find it
on searching.
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
Hello,
I developed one simple provider hosted app and I published it in my Azure website. I also published the SharePoint App of this solution in O365 site. I'm using Visual Studio 2013 Premium edition. I've followed all the steps to do this work e.g.
generate the client ID and client secret through my O365 site and updated the AppManifest.xml as well as web.config etc. In my AppWeb project, I've TokenHelper.cs and SharePoint.cs classes.
When I'm clicking the app from my O365 site, I get the following error "An error occurred while processing your request" which is due to the following code:
protected void Page_PreInit(object sender, EventArgs e)
Uri redirectUrl;
switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
case RedirectionStatus.Ok:
return;
case RedirectionStatus.ShouldRedirect:
Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
break;
case RedirectionStatus.CanNotRedirect:
Response.Write("An error occurred while processing your request.");
Response.End();
break;
It's always executing the case RedirectionStatus.CanNotRedirect. Why?
I've checked the method "CheckRedirectionStatus" of SharePointContext.cs class completely and I am not understanding why am I getting this error.
When I browse my Azure website http://sitename.azurewebsites.net, even there I'm getting this error. I believe that error is because there is no query string parameter there e.g. SPHostURL etc.
Please let me know why I'm having this redirection error.
Thanks,
AshishHi,
For a better troubleshooting,
I suggest you do as the following:
Debug the code step by step to find the reason of the issue.
For the remote debug your app from Windows Azure, you need to download Azure SDK:
http://azure.microsoft.com/en-us/downloads/
After installing the SDK, it will have “Attach Debugger” for Azure web site, you
also need to set "Attach Debugger" to on in the Windows Azure Management Portal
More detailed information about how to debug provider-hosted app:
http://blogs.technet.com/b/speschka/archive/2013/11/25/debugging-sharepoint-apps-that-are-hosted-in-windows-azure-web-sites.aspx
Best regards,
ZhengyuGuo
Forum Support
Please remember to mark the replies as answers if they help and unmark them if
they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Zhengyu Guo
TechNet Community Support -
Changing the Host String in Oracle 10.2.0.4
Hi,
Can you please let me know how to change the Host String from ORCL to "production".
I login now using the details below,
UN: system
PWD: production
Host String: orcl
Any help would be highly appreciated.Pravin wrote:
Hi,
I tried it but doesnt seem to work. Anyhow, i created a new database with my requirements and thus issue got resolved.
Maybe you should have provided a bit of detail to "doesn't seem to work".
I hope you didn't build a whole new house just because you couldn't get the key fit the front door . . .
Thanks for your response. Appreciate it.Edited by: EdStevens on Sep 27, 2010 3:43 PM
Maybe you are looking for
-
I cant get my adobe digital editions to recognise niether my iphone4 or my samsung galexy 8.9 3g tablet. I dont even have a device list in my lirary!! Im trying to download library books onto my tablet through overdrive, and i need adobe digital e
-
How do I run java application on IIS server
Hi, Can I run java application on IIS(Internet information Server)? If yes, How do i do that? My java application contains JSP,Servlets and EJB. To run java application on IIS which plug in should i use. Can anybody help me This is urgent...........
-
What strategy games may i play in my mac with mountain lion?
Examples: starcraft starraft 2 age of imperes 2 civiliztion what other strategy games may i play in the new software of mac?
-
Im making a site that has a semi transparent image as a background image for a div with text. Im looking at using a PNG8 or 32, but how and will these degradee in older browsers? If they become opaque thats fine, but if they dissapear then the text w
-
Please use production cost center!
Hi Experts, I am trying to raise a vendor invoice via FB60. After giving all the inputs like vendor, Amount, GL account, cost center. I am saving the document in ECC6. I get the error as below: Please use production cost center! could i know why i am