question

SaaniMD-7376 avatar image
0 Votes"
SaaniMD-7376 asked MughundhanRaveendran-MSFT commented

Azure Function App

Hi I have created a function app using visual studio community 2019 then I have published it on Microsoft Azure now the issue is I don't have that file in my local is there any way to get that file from Azure portal I have tried Kudu also but I am not able to get the .cs or the C# file were we write our logics ,can any one help me on this how can I get the code.

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MughundhanRaveendran-MSFT avatar image
1 Vote"
MughundhanRaveendran-MSFT answered MughundhanRaveendran-MSFT commented

@SaaniMD-7376 ,

Thanks for reaching out to us.

Please note that, during the deployment, only .dll , .pdb , .csproj and json files are deployed to the Function app. Basically whatever files are present in your "bin" file directory are pushed to the Azure Functions runtime. You can access these files either from Kudu site or from the portal via Download app content option. Since the .cs files doesnt get deployed, you wont be able to get it from the Portal

The .csproj file wont be available in the Kudu site. You can get it from the "download content" option present in Portal.

Go to your function app and click on "Download app content"
Choose "content and visual studio project"
A zip file with all the contents gets downloaded.

141737-image.png


Since this is a .net based function, you can use the .net reflector to step into and debug any third-party code / assemblies, right inside Visual Studio, even if you don't have their source code.

Feel free to reach out to me if you have any further queries.

I hope this helps!

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.




image.png (39.3 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SaaniMD-7376 ,

Just checking to see if the above answer was helpful or not

0 Votes 0 ·
SaaniMD-7376 avatar image SaaniMD-7376 MughundhanRaveendran-MSFT ·

Thanks Mughundhan Raveendranthe response but I am not able to download I am getting 500 internal error

143315-image.png



0 Votes 0 ·
image.png (34.0 KiB)

@SaaniMD-7376 ,

What happens when you launch the function app host url "appname.azurewebsites.net" ? Do you get the screen, your function app is up and running?

Please try to restart or stop/start and try to download again. If that doesnt work, please try to download using Ftp
https://medium.com/@michaelhenderson/how-to-download-your-source-code-from-azure-app-service-59c848752b0f

0 Votes 0 ·
Show more comments