简体   繁体   English

在ASP.NET C#Web应用程序中使用Google Doc API

[英]Use google doc API in asp.net C# web application

I am developing a web application in C#.net. 我正在C#.net中开发Web应用程序。 I need to edit a file placed on the server in browser it self(Without downloading it on local machine) and when I save that file, the changes should be reflected in file. 我需要在浏览器中自行编辑放置在服务器上的文件(无需在本地计算机上下载),当我保存该文件时,更改应反映在文件中。 For this I want to use google API but I don't know how can I use this. 为此,我想使用Google API,但我不知道该如何使用。 I want to do like below. 我想做如下。

  1. When I click on file name, it should open in browser. 当我单击文件名时,它应该在浏览器中打开。
  2. When clicked on edit, it open in edit mode in browser using google doc. 单击“编辑”后,它将在浏览器中使用Google Doc在编辑模式下打开。
  3. When I save that file, the changes should be reflected in my file which is placed on company server. 当我保存该文件时,所做的更改应反映在放置在公司服务器上的文件中。

How can I do all this thing with google doc API? 如何使用Google Doc API进行所有操作?

Install Google Drive on your server. 在服务器上安装Google云端硬盘。
Edit the file in Google docs, let Google Drive sync it to the local hard drive. 在Google文档中编辑文件,让Google云端硬盘将其同步到本地硬盘。

It is not possible for HTTP protocol, because the basics system doesn;t support it. HTTP协议是不可能的,因为基本系统不支持它。 You can open the file but the file will be downloaded to your local machine in then it will open, you have to specify the MIME type in IIS. 您可以打开文件,但是文件将被下载到本地计算机中,然后它将打开,您必须在IIS中指定MIME类型。

You can use two ways to do a similar job done. 您可以使用两种方法来完成类似的工作。

1 By Using FTP 1通过使用FTP

2 Customized solution : Make a page put a text field and load the file (.cs) in it and with submit save it to the file back. 2定制解决方案:在页面上放置一个文本字段并在其中加载文件(.cs),然后提交,将其保存回文件中。

You can embed a google doc in Webpages. 您可以在网页中嵌入Google文档。 But the file would be accessed and saved on Google's servers and not your company server: Wordpress allows you to do it. 但是可以访问该文件并将其保存在Google的服务器上,而不是保存在公司的服务器上:Wordpress允许您执行此操作。 Potentially you can see if it possible to do it in a similar way: http://en.support.wordpress.com/google-docs/ 您可能会看到是否有可能以类似的方式进行操作: http : //en.support.wordpress.com/google-docs/

I am not sure if Google has an option of accessing docs from servers outside google's domain. 我不确定Google是否可以选择从Google域之外的服务器访问文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 C# ASP.NET Core Web API 进行谷歌身份验证 - Google authentication with C# ASP.NET Core Web API 使用Google&Twitter登录插件在ASP.NET Web应用程序C#2008中进行注册的步骤是什么 - What are the Steps to use google & twitter login plugin for registration in asp.net web application c# 2008 在ASP.NET C#中将网页上的内容另存为.doc - Saving the contents on a web page as .doc in asp.net c# 如何在ASP.NET C#Web应用程序中使用ASP.NET VB页面 - How to use asp.net vb pages in asp.net c# web application 通过 Web api ASP.NET 框架 Web 应用程序 C# 将图像/文件上传到 blob azure - Upload images/files to blob azure, via web api ASP.NET framework Web application c# C# Console application wont post large dataset to asp.net .net core 3.0 web api - C# Console application wont post large dataset to asp.net .net core 3.0 web api webform应用程序asp.net中最好的调用web api c# - the best calling web api in webform application asp.net c# 强制Web应用程序使用某些dll版本C#asp.net - Force web application to use certain dll version C# asp.net 如何在使用C#作为服务器代码的ASP.NET Web应用程序中使用WF(Windows Workflow Foundation) - How to use WF (Windows Workflow Foundation) in a ASP.NET web application using C# as Server Code 如何在 ASP.NET C# Web 应用程序中使用 TraceSource.TraceEvent - How to use TraceSource.TraceEvent in a ASP.NET C# web application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM